Bug 1524591 Comment 14 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Sotaro Ikeda [:sotaro] from comment #13)

> (In reply to Jim Mathies [:jimm] from comment #10)
> 
> > Bob and I were discussing this today, looks like chromium creates a separate even queue for this child window. 
> > 
> > https://cs.chromium.org/chromium/src/gpu/ipc/service/child_window_win.cc?type=cs&q=ChildWindowWin&g=0&l=133

When we are talking about "event queue," we are not meaning at the application level; we are talking about the level of the window manager in the OS.

HWNDs have thread affinity: internally to the window manager, they share a single message queue that is *owned by the thread on which the window was created*. It is this per-thread message queue that becomes synchronized with the per-thread message queue on the thread whose HWND has been parented. You simply cannot assign an HWND a distinct queue; this is built into the window manager.
(In reply to Sotaro Ikeda [:sotaro] from comment #13)

> (In reply to Jim Mathies [:jimm] from comment #10)
> 
> > Bob and I were discussing this today, looks like chromium creates a separate even queue for this child window. 
> > 
> > https://cs.chromium.org/chromium/src/gpu/ipc/service/child_window_win.cc?type=cs&q=ChildWindowWin&g=0&l=133

When we are talking about "event queue," we are not meaning at the application level; we are talking about the level of the window manager in the OS.

HWNDs have thread affinity: internally to the window manager, they share a single message queue that is *owned by the thread on which the window was created*. It is this per-thread message queue that becomes synchronized with the per-thread message queue on the thread whose HWND has been parented. You simply cannot assign an HWND a distinct queue; this is built into the window manager.

(And no, calling `GetMessage` or `PeekMessage` with a specific HWND does not fix this problem, and in fact may exacerbate it)

Back to Bug 1524591 Comment 14