Multiple user problem -- C# MapScript Web Application (Is mapserver thread safe?)

Tamas Szekeres szekerest at GMAIL.COM
Wed Aug 9 10:25:56 EDT 2006


Benedikt,


> I never really wrote a line C#. What about this?:
> class MyClass
>   static readonly object globalLock = new object();
>   ...
>   public void anInstanceMethod () {
>     lock (globalLock ) {
>          umnMap.draw();
>      }
>    }
> Has every application domain it's own static members?
>
Theoretically yes.
http://www.go-mono.com/docs/index.aspx?link=ecmaspec%3A4
And the mapserver's static variables behave as static for all of the
appdomains.

> > However i am keen to implement such functionality at the SWIG
>  > interface level as an alternative to the USE_THREAD approach.
>  What a pitty! I loved your enthusiasm to provide a "real" solution :-)
No one is considering this as a definitive solution. However we have
to do something effective immediately. Later we will want to enhance
the solution a refining locks properly and eliminate the global
variables if possible.

Best Regards,

Tamas



More information about the mapserver-dev mailing list