mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 05:39:17 +02:00
runtime: force the garbage collector to run when a thread exits
This is a first attempt to improve the memory usage reported in issue #534.
This commit is contained in:
parent
d8aa289af4
commit
955695f554
1 changed files with 1 additions and 0 deletions
|
@ -7181,6 +7181,7 @@ void Cyc_exit_thread(void *data, object _, int argc, object * args)
|
|||
gc_remove_mutator(thd);
|
||||
ck_pr_cas_int((int *)&(thd->thread_state), CYC_THREAD_STATE_RUNNABLE,
|
||||
CYC_THREAD_STATE_TERMINATED);
|
||||
gc_force();
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue