-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace spin-lock with conditional variable for
SleepTask
(#3433)
Using spin-lock when threads are waiting could sometimes result in hangs on systems with heavy load. In this PR we replace spin-lock based `SleepTask` with the one based on the standard conditional variable. The performance could be slightly better or worse comparing to what we currently have, however, this change assures no hangs will happen.
- Loading branch information
Showing
4 changed files
with
31 additions
and
14 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -233,6 +233,7 @@ size_t get_hardware_concurrency() noexcept { | |
set_nthreads, | ||
dt::doc_options_nthreads | ||
); | ||
|
||
} | ||
#endif | ||
|
||
|
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