-
-
Notifications
You must be signed in to change notification settings - Fork 410
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
async thread: cleanup thread id and state variable
async_thread_id was set but never used, start_ipc_thread returning -1 which isn't a valid pthread_t, and handle used as a bool with a weird ++ pattern: clean this all up by replacing handle with a proper state enum (init, started, done), and join when we try to start thread again after it's been done successfully We still never join the thread when exiting after it's done once, nor do we care about its pthread_exit return value, but at least we don't leak resources everytime a new thread is started Signed-off-by: Dominique Martinet <[email protected]> Reviewed-by: Stefano babic <[email protected]>
- Loading branch information
Showing
1 changed file
with
23 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters