4 Jan
2005
4 Jan
'05
7:09 p.m.
On Tue, 2005-01-04 at 13:59 -0500, Doug Gregor wrote:
What are the symptoms of this behavior?
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
Ideally, a thread-safe Signals would allow you to invoke in several threads at one, disconnect signals in several threads concurrently, etc.
Ok. I get the high-level concept. Stephen