RFC 16: MapScript WxS Services

Frank Warmerdam warmerdam at POBOX.COM
Mon May 22 13:49:24 EDT 2006


Tamas Szekeres wrote:
> I think we could implement similar - but not equivalent -
> functionality by preallocating a global table containing the the
> assignments between the thread id-s and the io contexts. We would only
> need to make synchronization if a new thread id comes in, and a new
> assignment should be created. The lookup of this table could be done
> without locking.

Tamas,

I'm not sure this would be safe.  The only way to be sure someone isn't
updating the table while we are reading it is to have readers also lock
the table.  There might be approaches that would avoid this depending
on atomic updates and assuming things like never having to reallocate
the table larger.   But it still sounds a bit risky.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org



More information about the mapserver-dev mailing list