threads in mapserv

Frank Warmerdam warmerdam at POBOX.COM
Thu Mar 2 20:58:02 PST 2006


tim wrote:
> Hi,
> 
> the unix compile howto at
> http://mapserver.gis.umn.edu/docs/howto/compiling_on_unix
> gives as an example ./configure --with-threads (as one of many options)
> however the thread safe faq
> http://mapserver.gis.umn.edu/docs/faq/thread_safety
> says mapserver is /not/ thread safe.  Does this mean that the
> --thread-safe switch should not normally be used or am I not seeing
> something obvious here?  If so perhaps it should be noted in the howto.

Tim,

The thread-safe faq question goes on to explain that mapserver likely
can be used safely in some contexts.  The --with-threads switch basically
turns on mutex locking for various components.  In many cases (ie. GDAL)
this amounts to a BigLock(tm) around the whole subsystem substantially
limiting the amount of benefit from multi-threading.  But at least it
keeps things known to be problematic working pretty safely.

The --with-threads switch does not need to be used in normal cgi or
single threaded mapscript use.  It does add a modest overhead.  It
should be used in any situations where you think multiple threads might
be going through mapserver code at the same time.

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-users mailing list