www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Reminder

reply bobef <a a.com> writes:
Hmmm... this was like... one year and 30 DMD versions ago. And in D 1.0 it is
still not fixed...
http://www.digitalmars.com/d/archives/digitalmars/D/34291.html
Jan 06 2007
parent Sean Kelly <sean f4.ca> writes:
bobef wrote:
 Hmmm... this was like... one year and 30 DMD versions ago. And in D 1.0 it is
still not fixed...
 http://www.digitalmars.com/d/archives/digitalmars/D/34291.html
I'm not sure this is an easy one to fix. In this case, the DLL contains the full D runtime and it expects to be initialized to operate properly--the Thread code is a part of the runtime. The easiest fix would be to call Thread.thread_init() in the DLL before calling any other thread routines there. Alternately, the DLL load routine would have to be altered to pass in a handle to the GC which should be used, and this would implicitly initialize the thread code, etc. Personally, I think the current method of using D in DLLs kind of stinks anyway, so all of this may be worth investigating. Sean
Jan 06 2007