Skip to content

Commit

Permalink
Release context object after joining glib thread
Browse files Browse the repository at this point in the history
TSAN can report false-positive on context unref. By firstly joining
thread and later unreferencing context we will prevent such warning.
  • Loading branch information
arkq committed Apr 4, 2023
1 parent 1771a9d commit 523b369
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platform/Linux/PlatformManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ void PlatformManagerImpl::_Shutdown()

#if CHIP_DEVICE_CONFIG_WITH_GLIB_MAIN_LOOP
g_main_loop_quit(mGLibMainLoop);
g_main_loop_unref(mGLibMainLoop);
g_thread_join(mGLibMainLoopThread);
g_main_loop_unref(mGLibMainLoop);
#endif
}

Expand Down

0 comments on commit 523b369

Please sign in to comment.