[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 Dec 28 15:08:22 EST 2007


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

User luke.a.page at gmail.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=325033#c4


Luke Page <luke.a.page at gmail.com> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |luke.a.page at gmail.com




--- Comment #4 from Luke Page <luke.a.page at gmail.com>  2007-12-28 13:08:22 MST ---
Win32 wise:

We call Win32SetTimer in XPlatUIWin32 and specify FosterParent as the window
pointer which will receive the timer message, however the microsoft
documentation says:

hWnd
[in] Handle to the window to be associated with the timer. This window must be
owned by the calling thread. If a NULL value for hWnd is passed in along with
an nIDEvent of an existing timer, that timer will be replaced in the same way
that an existing non-NULL hWnd timer will be.

However the FosterParent isn't owned by the calling thread when we create a new
thread to create a new window..

In this case, when the HWnd is not owned by the calling thread, a timer message
still gets posted to the window, but the index is always 1, rather than being
the paramter passed to SetTimer.

This is the only reason I can find for this to be failing (perhaps Linux also
has a different problem caused by different threads?).

I don't know enough about XPlatUIWin32 and Win32 programming to suggest a
solution I would be happy with, but if someone pointed me in the right
direction I'll have a go..


-- 
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