I've been looking at how threads communicate in Gears and just wanted
to clarify a few things.

Internally to the Workerpool, each Worker has their own message
queues. When messages are sent by any Worker, they go through the
PoolThreadManager and are added to the appropriate Worker's queue.
Then a notification is sent to Worker telling it there's a message. I
understand the Windows (IE) implementation with posting messages to
HWNDs, but how does firing notifications to Firefox cause its Worker's
onmessage function to be invoked? Also, is there no PoolThreadManager
for Chrome?
Is there only one PoolThreadManager per Workerpool? If there is, what
prevents multiple Workers from being invoked and calling
GetPoolMessage simultaneously?
Also, it appears the Chrome message queue implementation relies on
Window's HWNDs. How do Chrome/Gears work on other platforms?

There are IPC message queue classes aside from the message queue
classes that PoolThreadManager uses. I assume these are for inter-
process communication between Gears and the browser, but if all the
Workers in the Workerpool and the main application parent thread can
all communicate via inter-thread message passing, when do Gears/the
browser have to communicate over process boundaries.

Thank you

Reply via email to