Re: Synchronous postMessage for Workers?

On Thu, Nov 17, 2011 at 8:05 PM, Jonas Sicking <jonas@sicking.cc> wrote:

> On Thu, Nov 17, 2011 at 2:07 PM, David Levin <levin@chromium.org> wrote:
> > It seems like this mechanism would deadlock a worker if two workers send
> > each other a synchronous message.
>
> Indeed. We can only allow child workers to block on parent workers.
> Never the other way around.
>

Note that the port entangled with the port you're waiting on might be
transferred between workers while you're waiting on it, changing hands from
a parent worker to a child worker.  It might be a valid port to block on
when you make the call, and stop being valid later.

I'm still thinking about this, but one note is that this isn't needed for
the polling case (where timeout is 0).

-- 
Glenn Maynard

Received on Friday, 18 November 2011 02:50:10 UTC