[Mapserver-dev] Recent progress on mapserver thread safety

Frank Warmerdam warmerdam at pobox.com
Tue Oct 12 09:48:32 EDT 2004


Sean Gillies wrote:
> 1) implement a second global parser for use in msEvalExpression

Sean,

My understanding (and Steve obviously knows more about this) is that the
mapfile parsing uses only the lexer while msEvalExpression() uses the
yacc/bison parser which in turn uses the same low level lexer as the
mapfile code uses.  It might be possible to build a seperate lexer instance
for the expressions.

> and/or
> 
> 2) pull the parser locking out of msEvalExpression, and instead lock around
> the loops which call msLayerNextShape.

I don't think this would be all that wise. My take would be that
mapfile parsing is pretty quick while in some cases processing shapes
can take a long time, much of which is not spent in the parser at all.

> or
> 
> 3) rewrite msEvalExpression so that it doesn't need a parser for logical
> expressions.
 >
> I'd love to get some feedback from folks who are interested in using
> mapserver in a multithreaded environment.

Well, my longer term suggestion has always been to look into whether we
can get a thread safe lexer in place, either by researching flex options
in greater depth or if necessary by rewriting the lexer by hand.  Lexers
aren't really that hard.

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