Re: A thread without GC

2013-07-09 Thread Sean Kelly
On Jul 8, 2013, at 8:08 AM, Adam D. Ruppe destructiona...@gmail.com wrote: On Monday, 8 July 2013 at 14:53:25 UTC, John Colvin wrote: I wonder if one could somehow register a pre-existing thread with std.concurrency, being careful not to introduce any reference that lets in the garbage

Re: A thread without GC

2013-07-09 Thread Sean Kelly
On Jul 8, 2013, at 7:04 AM, John Colvin john.loughran.col...@gmail.com wrote: I would post this in d.learn, but I suspect there isn't an easy answer so it would be good to have some serious discussion here. Is there any way to create a thread that is totally free from the garbage

A thread without GC

2013-07-08 Thread John Colvin
I would post this in d.learn, but I suspect there isn't an easy answer so it would be good to have some serious discussion here. Is there any way to create a thread that is totally free from the garbage collector? I.e. Nothing in that thread will ever be scanned by the GC. Therefore, when

Re: A thread without GC

2013-07-08 Thread Adam D. Ruppe
If you make a thread using the operating system functions directly, D would never know (I'm pretty sure) and thus it won't be on the gc nor the list the gc uses to pause all threads.

Re: A thread without GC

2013-07-08 Thread w0rp
On Monday, 8 July 2013 at 14:04:41 UTC, John Colvin wrote: I would post this in d.learn, but I suspect there isn't an easy answer so it would be good to have some serious discussion here. Is there any way to create a thread that is totally free from the garbage collector? I.e. Nothing in

Re: A thread without GC

2013-07-08 Thread John Colvin
On Monday, 8 July 2013 at 14:11:16 UTC, w0rp wrote: On Monday, 8 July 2013 at 14:04:41 UTC, John Colvin wrote: I would post this in d.learn, but I suspect there isn't an easy answer so it would be good to have some serious discussion here. Is there any way to create a thread that is totally

Re: A thread without GC

2013-07-08 Thread w0rp
On Monday, 8 July 2013 at 14:16:46 UTC, John Colvin wrote: On Monday, 8 July 2013 at 14:11:16 UTC, w0rp wrote: We really need to implement a better GC. That's the very hard but better solution. We need to have a bchoice/b of GCs. There is no single design that is right for every use case.

Re: A thread without GC

2013-07-08 Thread Dicebot
On Monday, 8 July 2013 at 14:04:41 UTC, John Colvin wrote: Is there any way to create a thread that is totally free from the garbage collector? Sure, just few pull request here, some pull requests there... ;)

Re: A thread without GC

2013-07-08 Thread John Colvin
On Monday, 8 July 2013 at 14:11:15 UTC, Adam D. Ruppe wrote: If you make a thread using the operating system functions directly, D would never know (I'm pretty sure) and thus it won't be on the gc nor the list the gc uses to pause all threads. Huh. Well that was easy. Presumably that means I

Re: A thread without GC

2013-07-08 Thread Adam D. Ruppe
On Monday, 8 July 2013 at 14:53:25 UTC, John Colvin wrote: I wonder if one could somehow register a pre-existing thread with std.concurrency, being careful not to introduce any reference that lets in the garbage collector. There is a thread_attachThis() in core.thread that Registers the