On Tue, 2005-01-04 at 21:27 -0500, Douglas Gregor wrote:
If you're using a signal from two threads concurrently, you will most likely see random crashes and other bad behavior. Signals keep a lot of state, even when they are being invoked, so just about anything can trip it up.
The first thing that came to mind about this was thread specific storage (TSS). Here is a design pattern that will do what I think we need. http://www.cs.wustl.edu/~schmidt/PDF/TSS-pattern.pdf
That solves part of the problem, but there's more too it. Eric Niebler wrote a few posts to the developer's list describing some locking mechanisms that could be used to make signals work in a multithreaded environment.
Doug
Do you know how to get a hold of Eric? I would like to see if he has done any work on the locking mechanisms. Stephen