From 88ee115381fd333b3374e1f44bebb448a886393e Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Wed, 5 Feb 2020 13:09:11 +0100 Subject: [PATCH] doc: clarify Worker exit/message event ordering Motivated by the fact that getting this wrong has led to flaky tests in our test suite. Refs: https://github.com/nodejs/node/pull/31637 --- doc/api/worker_threads.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md index 6ae0ada97f193a..d969e028631979 100644 --- a/doc/api/worker_threads.md +++ b/doc/api/worker_threads.md @@ -582,6 +582,8 @@ exited by calling [`process.exit()`][], the `exitCode` parameter will be the passed exit code. If the worker was terminated, the `exitCode` parameter will be `1`. +This is the final event emitted by any `Worker` instance. + ### Event: `'message'`