Skip to content

Commit

Permalink
Do not join the child thread because that gets terminated automatical…
Browse files Browse the repository at this point in the history
…ly anyways.
  • Loading branch information
alexdima committed Oct 25, 2021
1 parent 7a22f5d commit 9c26199
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/keyboard_x.cc
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,9 @@ static void NotifyJS(napi_env env, napi_value func, void* context, void* data) {
static void FinalizeThreadsafeFunction(napi_env env, void* raw_data, void* hint) {
NotificationCallbackData *data;
napi_get_instance_data(env, (void**)&data);
pthread_join(data->tid, NULL);
// TODO: signal to the other thread that it should break the while (true) loop
// only then consider uncommenting the next line:
// pthread_join(data->tid, NULL);
data->tsfn = NULL;
}

Expand Down

0 comments on commit 9c26199

Please sign in to comment.