зеркало из https://github.com/github/ruby.git
need to sync gc_finalize_deferred
gc_finalize_deferred() runs finalizers and it accesses objspace, so it need to sync.
This commit is contained in:
Родитель
75416b8628
Коммит
61236770e6
12
gc.c
12
gc.c
|
@ -3725,9 +3725,15 @@ static void
|
|||
gc_finalize_deferred(void *dmy)
|
||||
{
|
||||
rb_objspace_t *objspace = dmy;
|
||||
if (ATOMIC_EXCHANGE(finalizing, 1)) return;
|
||||
finalize_deferred(objspace);
|
||||
ATOMIC_SET(finalizing, 0);
|
||||
|
||||
RB_VM_LOCK_ENTER();
|
||||
{
|
||||
rb_objspace_t *objspace = dmy;
|
||||
if (ATOMIC_EXCHANGE(finalizing, 1)) return;
|
||||
finalize_deferred(objspace);
|
||||
ATOMIC_SET(finalizing, 0);
|
||||
}
|
||||
RB_VM_LOCK_LEAVE();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Загрузка…
Ссылка в новой задаче