|
Looks like there's a regression in your code when compared to
the current CVS.
In Timer.Runner.Dispose(bool) it is possible that you call
wait.Set() on an already-disposed "wait" object which holds unmanaged
resource.
Consider this scenario:
1. You create new Runner()
2. Runner() constructor creates a new
ManualResetEvent()
3. ...some time passes...
4. Both Runner and ManualResetEvent become garbage so they are
added to the finalization queue
5. ManualResetEvent gets finalized first
6. You call "wait.Set()" on it when finalizing Runner which
leads to some strange results.
This causes the possible deadlocks when unloading appdomains
and was reported as a bug and fixed here:
BTW. Why is that Thread.Sleep(100) needed there ? This looks
like a huge hack.
Jarek
|
- [Mono-list] 3 TODOs in Threading namespace almost comple... Mr. Deepak P N
- Re: [Mono-list] 3 TODOs in Threading namespace almo... Jaroslaw Kowalski
- Re: [Mono-list] 3 TODOs in Threading namespace almo... Jonathan Pryor
- RE: [Mono-list] 3 TODOs in Threading namespace almo... Jeroen Frijters
- RE: [Mono-list] 3 TODOs in Threading namespace ... Miguel de Icaza
- RE: [Mono-list] 3 TODOs in Threading namespace almo... Jeroen Frijters
