mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 00:57:19 +03:00
Fix a background_thread shutdown issue.
1) make sure background thread 0 is always created; and 2) fix synchronization between thread 0 and the control thread.
This commit is contained in:
parent
956c4ad6b5
commit
21eb0d15a6
2 changed files with 29 additions and 21 deletions
|
|
@ -24,6 +24,9 @@ TEST_BEGIN(test_deferred) {
|
|||
size_t sz_b = sizeof(bool);
|
||||
assert_d_eq(mallctl("background_thread", NULL, NULL, &enable, sz_b), 0,
|
||||
"Failed to enable background threads");
|
||||
enable = false;
|
||||
assert_d_eq(mallctl("background_thread", NULL, NULL, &enable, sz_b), 0,
|
||||
"Failed to disable background threads");
|
||||
}
|
||||
TEST_END
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue