Semaphores and the GC.

Dave Dave_member at pathlink.com
Fri Mar 31 12:05:32 PST 2006


Both windows and linux semaphores will not work correctly in the presence of the
GC when it 'stops and restarts' the world (or at least I've not been able to get
something working). The problem appears to be from pausing and/or resuming
threads.

I've tried all of native POSIX semaphores and pthread mutex/conditions on Linux,
and Windows API Semaphores. They all work up and until a GC happens or threads
are paused and resumed in some other way.

Anyone out there have any ideas on how to implement POSIX semaphore-like
functionality that will work w/ the GC?

Thanks,

- Dave





More information about the Digitalmars-d mailing list