W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: Synchronous postMessage for Workers?

From: David Levin <levin@chromium.org>
Date: Thu, 17 Nov 2011 19:33:55 -0800
Message-ID: <CACmjMJTykR6rwVBTXKjMW7o1=h6Y3tRfHuLwDJcUMum+LCQPAw@mail.gmail.com>
To: Jonas Sicking <jonas@sicking.cc>
Cc: Joshua Bell <jsbell@chromium.org>, public-webapps@w3.org
On Thu, Nov 17, 2011 at 6:41 PM, Jonas Sicking <jonas@sicking.cc> wrote:

> On Thu, Nov 17, 2011 at 6:05 PM, David Levin <levin@chromium.org> wrote:
> >
> >
> > On Thu, Nov 17, 2011 at 5: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.
> >
> > So the api would have to know who is listening to the other end of the
> port
> > and throw if it isn't a parent?
>
> I'm not convinced that we can do this with ports in a sane manner.
> Only on dedicated workers. There you always know who is listening on
> the other end. I.e. only on the DedicatedWorkerGlobalScope/Worker
> interfaces.


Ah so the proposal is really only adding a new method only
on DedicatedWorkerGlobalScope which send a synchronous message and
something corresponding on Worker which can respond to this.

This proposal as you see it does nothing for port or shared workers.

That seems to make more sense now.

dave
Received on Friday, 18 November 2011 03:34:53 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:48 GMT