Are web workers proactive or not?

I think web workers are not proactive. Otherwise, I don’t understand how they can be completed using the terminate API. Is it correct?

+4
source share
1 answer

Website workers do not unload anything from the main window.

This is a message-based event model. Thus, you can call completion from the main window, and depending on where the worker executes it, you may or may not receive the last message.

Assuming you have some kind of manufacturer, consumer model.

0
source

All Articles