Terminate a worker

suggest change

Once you are done with a worker you should terminate it. This helps to free up resources for other applications on the user’s computer.

Main Thread:

// Terminate a worker from your application.
worker.terminate();

Note: The terminate method is not available for service workers. It will be terminated when not in use, and restarted when it’s next needed.

Worker Thread:

// Have a worker terminate itself.
self.close();

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents