You snipped the comment about waitForMessage(). I think it should return an Event, as if the message had been received from onmessage, not just the received data.
On Sun, Oct 13, 2013 at 10:37 PM, Jonas Sicking <jo...@sicking.cc> wrote: > This is certainly an improvement over the previous proposal. However > given that synchronous APIs of any type are quite controversial, I'd > rather stick to a basic approach for now. > There's nothing controversial about synchronous APIs in workers. Doing work synchronously is the whole point. The nice thing about your proposal is that it's strictly additive, so > it's something we can add later if there's agreement that the problems > it aims to solve are problems that need solving, and there's agreement > that the proposal is the right way to solve them. > This will cause people to learn to structure their workers poorly, and to create worker libraries based on that structure, with extra message relaying infrastructure to work around this, and pollute people's still-immature understanding of message ports. We should do it right in the first place. On Mon, Oct 14, 2013 at 4:33 AM, David Rajchenbach-Teller < dtel...@mozilla.com> wrote: > Let me introduce the first sketch of a variant. The general idea is to > add a |postSyncMessage| > (I'm not sure what problems with the existing proposals this is trying to solve.) -- Glenn Maynard