www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Garbage-Collector And Threads

reply Denis Washington <Denis_member pathlink.com> writes:
I'm suggesting to write an OS with D, and have one big question: does the D
garbage-collector require multi-threading? Does it run in it's own thread?
May 01 2005
next sibling parent "Ben Hinkle" <ben.hinkle gmail.com> writes:
"Denis Washington" <Denis_member pathlink.com> wrote in message 
news:d52r38$2obn$1 digitaldaemon.com...
 I'm suggesting to write an OS with D, and have one big question: does the 
 D
 garbage-collector require multi-threading? Does it run in it's own thread?
The garbage collector does not require multi-threading and currently a collection is run in the thread that made the allocation request. Other garbage collectors could run in a separate thread, though - the language makes no assumption the issue.
May 01 2005
prev sibling parent Sean Kelly <sean f4.ca> writes:
In article <d52r38$2obn$1 digitaldaemon.com>, Denis Washington says...
I'm suggesting to write an OS with D, and have one big question: does the D
garbage-collector require multi-threading? Does it run in it's own thread?
No, and no, respectively :) The GC is run when you call 'new' and it's run in the context of the calling thread. Sean
May 02 2005