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

Add link explaining the Safari workaround #13

Open
kaycebasques opened this issue Nov 29, 2018 · 4 comments
Open

Add link explaining the Safari workaround #13

kaycebasques opened this issue Nov 29, 2018 · 4 comments

Comments

@kaycebasques
Copy link

https://github.com/PolymerLabs/actor-boilerplate/blob/master/src/bootstrap.ts#L25

Got an issue or PR that explains why this is needed?

@surma
Copy link
Contributor

surma commented Nov 29, 2018

it says right above. Or are you looking for something more in-depth? It's necessary to keep the worker alive. Safari seems to kill workers that don't receive messages.

@kaycebasques
Copy link
Author

Right, I saw that. I was looking for more info. Just curious about the behavior.

@surma
Copy link
Contributor

surma commented Nov 29, 2018

There really isn’t much more info than that :D We were just wondering why our worker suddenly stopped polling idb and it seems that Safari assumes that if a worker doesn’t receive or send messages after ~3 seconds, it’s superfluous and kills it.

Sending messages, even if there’s no message handler in the worker, seems to prevent Safari from killing it.

@kaycebasques
Copy link
Author

kaycebasques commented Nov 29, 2018

Welp, the good news is that we're creating the documentation now with this thread!

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