[Mono-bugs] [Bug 325033] Threading: Timer ticks on wrong thread, when multiple threads running message-loops

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri May 2 11:51:09 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=325033

User atsushi at ximian.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=325033#c5





--- Comment #5 from Atsushi Enomoto <atsushi at ximian.com>  2008-05-02 09:51:08 MST ---
Created an attachment (id=212016)
 --> (https://bugzilla.novell.com/attachment.cgi?id=212016)
proposed patch for win32

The thread that creates and invokes Start() is the first application loop
thread, which is different from the primary(?) thread that created
FosterParent.
Basically, using FosterParent for Win32SetTimer() is wrong.

When Timer.Start() is invoked, no window is active (even in .NET,
Form.ActiveForm is null at the call to Timer.Start() in the repro) and hence
logically it cannot be started (as Luke pointed out, the handle must be created
in the same thread as the thread that is going to invoke SetTimer), but .NET
actually runs this timer.

So, my guess is that those inactive timers should be "set" when a Form is
activated.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list