DMD 1.022 and 2.005 releases - what's wrong with threading?
Sean Kelly
sean at f4.ca
Mon Oct 8 14:04:11 PDT 2007
Bruno Medeiros wrote:
> Sean Kelly wrote:
>>
>> For what it's worth, Java has pause/resume as deprecated members of
>> its Thread class. I suspect they originally included them for garbage
>> collection as well, and deprecated them when people started using them
>> for synchronization (they're a fantastic way to deadlock an app).
>> Doug Lea's containers and such use them, for example, because Java
>> does not offer standalone mutexes, semaphores, etc.
>
> Hum, what do you mean by "standalone mutexes, semaphores, etc."?
I mean standalone synchronization primitives. As far as I know, the
only way to suspend a thread in Java is via Thread.pause(). This makes
it possible to /implement/ a semaphore, but doing so basically requires
implementing a scheduling/priority policy as well. By comparison, a D
app can simply use the OS API for this stuff, because there's no VM to
worry about.
Sean
More information about the Digitalmars-d
mailing list