Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Needed to use setTimeout with at least 1 millisecond for postMessage to task #2

Open
ewindso opened this issue Jun 23, 2012 · 2 comments

Comments

@ewindso
Copy link

ewindso commented Jun 23, 2012

Just fyi... I was following the example but it wasn't working... but when I did a setTimeout() with 1 millisecond for posting to the task, it worked.

Thanks btw -- this is great and what I've been waiting for for Titanium!

@allenhartwig
Copy link

Same problem here. It would be great to have a 'ready' event for the worker so we know when we can begin posting data to it... or have the createWorker method run synchronously.

@allenhartwig
Copy link

I'm finding that I need a timeout upwards of 1000ms otherwise if worker.postMessage(...) is called from within the worker script, it won't fire properly. This results in no error on SDK 2.0.2, however, on 2.1.0 it errors out with:

unrecognized selector sent to instance

on the line within the worker script calling the postMessage method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants