These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:05 pm Advanced search

Web Workers: Workers within Workers?

Do you think the HTML spec should do something differently? You can discuss spec feedback here, but you should send it to the WHATWG mailing list or file a bug in the W3C bugzilla for it to be considered.

Web Workers: Workers within Workers?

Postby anentropic » Thu Jul 15, 2010 3:38 pm

Is it going to be allowed to spawn Workers from within other Workers?

Mozilla says yes:
https://developer.mozilla.org/en/Using_web_workers

...their Fibonacci example doesn't work though because they have an HTML 4 doctype on the page... (couldn't get it working in a proper page either)

In Chrome 5 (OS X) I get 'Worker is not defined' error when trying to instantiate a new Worker within a Worker.

In FF 3.6.6 I don't get an error but there seems to be something wrong with the messages posted by the inner Workers... the parent receives a message event but the event.data is blank.

Does the spec have anything to say on this issue? It would be good to have consistent behaviour one way or the other.
anentropic
<h6>
 
Posts: 3
Joined: Thu Jul 15, 2010 11:48 am

Postby zcorpan » Fri Jul 16, 2010 9:44 am

The spec allows creating nested workers, and it works fine in Opera 10.60.
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Postby anentropic » Fri Jul 16, 2010 10:48 am

Ok, that's great to know. I might be wrong about FF3.6, though I'm pretty sure it wasn't just my code. Chrome definitely doesn't like it at the mo. Hopefully in the next versions!
anentropic
<h6>
 
Posts: 3
Joined: Thu Jul 15, 2010 11:48 am


Return to Feedback on the Specs

Who is online

Users browsing this forum: No registered users and 1 guest