Merge pull request #6253 from dearblue/fiber-sweep

Allow recycling fibers by GC if not referenced directly
This commit is contained in:
Yukihiro "Matz" Matsumoto
2024-04-25 11:34:08 +09:00
committed by GitHub
2 changed files with 20 additions and 7 deletions
-1
View File
@@ -429,7 +429,6 @@ mrb_env_unshare(mrb_state *mrb, struct REnv *e, mrb_bool noraise)
{
if (e == NULL) return TRUE;
if (!MRB_ENV_ONSTACK_P(e)) return TRUE;
if (e->cxt != mrb->c) return TRUE;
e->cxt = NULL; /* make possible to GC the fiber that generated the env */