Skip to content

Commit d3b7122

Browse files
author
Tobi
authored
threaded_close (gvalkov#165)
* threaded_close * default to false * revert
1 parent 7ee9e37 commit d3b7122

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎evdev/device.py‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import warnings
55
import contextlib
66
import collections
7-
import threading
87

98
from evdev import _input, ecodes, util
109
from evdev.events import InputEvent
@@ -303,9 +302,7 @@ def close(self):
303302
if self.fd > -1:
304303
try:
305304
super().close()
306-
# avoid blocking at the end of functions when the destructor
307-
# is called.
308-
threading.Thread(target=os.close, args=(self.fd,)).start()
305+
os.close(self.fd)
309306
finally:
310307
self.fd = -1
311308

0 commit comments

Comments
 (0)