Skip to content

Commit 82656fb

Browse files
author
dzsekijo
committed
Remove Python locks from the destroy method.
Deadlock issue was reported by Forest Bond. NOTES: These locks were undisputedly bogus as the point when destroy is called is out of the scope where Python locking is set up. Removing them and doing nothing more (as it's done now) is also OK if we assume that the module is used for writing a standalone program where thread management is completely handled by the fuse library -- as in this case the lib will ensure that there will be only one thread when the destroy method is called. However, this way: - We rely on an implementation detail of the lib. - If the Python fuse module is intended to be used in a "library fashion", ie. as a part of a more complex program where threads are created apart from the fuselib ones, then the locks might be needed for destroy. Anyway, I couldn't really extend the scope of Python locking in a way that embraces destroy's invocation and actually works, so I stick with simply removing those locks for now.
1 parent bd871a2 commit 82656fb

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

fuseparts/_fusemodule.c

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

784-
PYLOCK();
785784
PyObject_CallFunction(fsdestroy_cb, "");
786-
PYUNLOCK();
787785
}
788786
#endif
789787

0 commit comments

Comments
 (0)