Problems w/ MapScript C#

Frank Warmerdam fwarmerdam at GMAIL.COM
Thu Apr 7 09:16:16 EDT 2005


On Apr 7, 2005 4:58 AM, Holger Flörke <floerke at doctronic.de> wrote:
> What flag should add to nmake.opt to enable thread support within the win32
> mapserver? I saw the compiler Flag USE_THREAD, but is it sufficient?

Holger, 

Add -DUSE_THREAD in OPTFLAGS should do the trick to enable
the thread locking stuff. 
 
> Why is the thread-support off at default?

Inherent conservatism?  Avoiding the extra thread locking overhead in
cases where it isn't needed (it really serves no purpose in MapServer
CGI). 

Johannes says:
> Just another wild swing :-). Morten is using the
> windows binary of the gd library. Doing this you have
> to compile everything with VC6 and you have to bind
> the multithreaded dll crt. see the gd faq for more
> information

This is the default way of building MapServer now (using the 
binary package and building against MSVCRT.DLL).  But you are
right that all sorts of problems will occur if you don't do something
like this.  I would add that in a multithreaded windows situation it
is also presumably important to use a multithreaded runtime library.
I think this is accomplished by using /MT instead of /MD but I am 
not so familiar with this and whether it might interfere with the use
of MSVCRT.DLL. 

Ideally we either need a savvy developer on windows who really
cares about this multithreaded stuff and is willing to spend time to 
work out issues, and get them folded back into CVS.  Or we need
a client who cares enough to finanicially motivate a savvy 
developer to do all these things.  

MapServer works well on windows due to the efforts of Assefa and
others, but the "dark corners" that don't affect Assefa or I can easily
be poorly addressed.  This certainly includes multi-threading and 
of course SWIG bindings like the C# ones. 

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    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list