Skip to content

Commit 83dc88a

Browse files
author
dzsekijo
committed
Handle fsdestroy() vs. threading issue more sensibly than it was in 6dde0b0ad433.
Now fsdestroy() works both when it's called as a DESTROY handler and when it's called within the lib's final clean-up.
1 parent 0fcf67e commit 83dc88a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

fuseparts/_fusemodule.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,9 @@ fsdestroy_func(void *param)
781781
{
782782
(void)param;
783783

784+
PYLOCK();
784785
PyObject_CallFunction(fsdestroy_cb, "");
786+
PYUNLOCK();
785787
}
786788
#endif
787789

@@ -889,6 +891,7 @@ pyfuse_loop_mt(struct fuse *f)
889891
save = PyEval_SaveThread();
890892
err = fuse_loop_mt(f);
891893
PyEval_RestoreThread(save);
894+
interp = NULL;
892895
#endif
893896

894897
return(err);

0 commit comments

Comments
 (0)