We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc5d7f2 commit 6a895a3Copy full SHA for 6a895a3
src/module.h
@@ -32,13 +32,17 @@ struct Terminator {
32
bool blocky = false;
33
#endif
34
35
+ /* Start termination asynchronously so we can detect if it takes long
36
+ and should warn the user about this default blocking behaviour. */
37
auto terminate = std::async(std::launch::async, [&] {
38
auto err = zmq_ctx_term(context);
39
assert(err == 0);
40
});
41
42
using namespace std::chrono_literals;
43
if (terminate.wait_for(500ms) == std::future_status::timeout) {
44
+ /* We can't use process.emitWarning, because the Node.js runtime
45
+ has already shut down. So we mimic it instead. */
46
fprintf(stderr,
47
"(node:%d) WARNING: Waiting for queued ZeroMQ messages to be "
48
"delivered.%s\n",
0 commit comments