Shared pain
Steve Teale
steve.teale at britseyeview.com
Thu Nov 18 22:49:30 PST 2010
> As I said before, I don't know if the thread being created by the
> windows service procedure is properly initializing the D modules of the
> library/runtime. Try as the first line of ServiceMain to initialize the
> current thread:
>
> auto mythread = thread_attachThis();
>
> see http://www.digitalmars.com/d/2.0/phobos/core_thread.html
>
> -Steve
Steve,
I don't think it gets as far as ServiceMain. Anyway, I tried it there,
and at the point just before the first WINAPI call, but it still crashes.
I can fix it, by making my statically initialized RegExp objects __gshared
or immutable, but the latter involves inserting a slew of tedious casts
into my XML parser, since RexExp calls are used all over the place.
See my separate post for my thoughts on that.
Thanks
Steve
More information about the Digitalmars-d
mailing list