Re: Threading Question

2012-10-30 Thread Sean Kelly
On Oct 30, 2012, at 11:06 AM, Alex Rønne Petersen wrote: > On 30-10-2012 19:04, Sean Kelly wrote: >> >> >> The semaphore implementation for OSX is not signal-safe. Originally, >> druntime used the signal approach on OSX and had deadlock issues in the >> signal handler (OSX semaphores wrap a

Re: Threading Question

2012-10-30 Thread Alex Rønne Petersen
On 30-10-2012 19:04, Sean Kelly wrote: On Oct 25, 2012, at 11:18 PM, Jacob Carlborg wrote: On 2012-10-26 01:18, Sean Kelly wrote: On Oct 25, 2012, at 4:12 PM, Alex Rønne Petersen wrote: What's used on OS X? I forget... The method used is similar to how GC works on Windows--there's a kern

Re: Threading Question

2012-10-30 Thread Sean Kelly
On Oct 25, 2012, at 11:18 PM, Jacob Carlborg wrote: > On 2012-10-26 01:18, Sean Kelly wrote: >> On Oct 25, 2012, at 4:12 PM, Alex Rønne Petersen wrote: >>> >>> What's used on OS X? I forget... >> >> The method used is similar to how GC works on Windows--there's a kernel call >> that can be us

Re: Threading Question

2012-10-25 Thread Jacob Carlborg
On 2012-10-26 01:18, Sean Kelly wrote: On Oct 25, 2012, at 4:12 PM, Alex Rønne Petersen wrote: What's used on OS X? I forget... The method used is similar to how GC works on Windows--there's a kernel call that can be used to explicitly suspend a thread. I can't remember the function name

Re: Threading Question

2012-10-25 Thread Peter Sommerfeld
Sean Kelly wrote: [snip] In D, the main thread will join all non-daemon threads before calling static dtors or performing any other cleanup. Daemon threads will continue to run until the process exits. So daemon threads are basically just C-style kernel threads. [snip] The GC in D uses S

Re: Threading Question

2012-10-25 Thread Sean Kelly
On Oct 25, 2012, at 4:12 PM, Alex Rønne Petersen wrote: > > What's used on OS X? I forget... The method used is similar to how GC works on Windows--there's a kernel call that can be used to explicitly suspend a thread. I can't remember the function name offhand though.

Re: Threading Question

2012-10-25 Thread Alex Rønne Petersen
On 26-10-2012 01:11, Sean Kelly wrote: On Oct 23, 2012, at 11:25 AM, Peter Sommerfeld wrote: Hi! I'm new to D an not a native speaker so I may misunderstand the following sentence of the thread documentation. "final @property void isDaemon(bool val); Sets the daemon status for this thread.

Re: Threading Question

2012-10-25 Thread Sean Kelly
On Oct 23, 2012, at 11:25 AM, Peter Sommerfeld wrote: > Hi! > > I'm new to D an not a native speaker so I may misunderstand > the following sentence of the thread documentation. > > "final @property void isDaemon(bool val); > > Sets the daemon status for this thread. While the runtime > will w

Threading Question

2012-10-23 Thread Peter Sommerfeld
Hi! I'm new to D an not a native speaker so I may misunderstand the following sentence of the thread documentation. "final @property void isDaemon(bool val); Sets the daemon status for this thread. While the runtime will wait for all normal threads to complete before tearing down the process, d