Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

is there anyway to figure out if child worker is started(or not)? #30

Open
yyfrankyy opened this issue Aug 31, 2011 · 2 comments
Open

Comments

@yyfrankyy
Copy link

When my child worker have some syntax error, or runtime error which outside onmessage, onerror callback, the parent worker does not show any message, just wait there.

Today I just use process.env.NODE_DEBUG = 0x8 to open webworker's debug mode. then I can see wwutil's debug infomation, it does have some debug information when the worker wasn't started correctly, is there any function I can call or event I can listen to and print out those errors(instead just open webworker's debug mode as I am doing now.)?

@diversario
Copy link

Same over here, worker fails silently if anything is wrong.

@rfunduk
Copy link

rfunduk commented Sep 20, 2011

Once strategy I've used before is to write, at the bottom of your worker file:

postMessage( { ready: true } );

...and simply receive that message in your parent after starting the worker to signify that everything went according to plan.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants