#!/usr/bin/python3
import evdev
def a():
print([evdev.InputDevice(path) for path in evdev.list_devices()])
a()
print('end')
Various InputDevice objects are printed immediately, but it takes a second until 'end' appears because function a seems to be exited with a delay. If you multiply list_devices() the delay becomes longer.
It seems very odd that a function that prints the result then takes additional time to exit, seemingly doing nothing at all. Is there some blocking stuff in InputDevice destructors going on? It seems the delay happens as soon as the InputDevice objects are not needed anymore.
Various InputDevice objects are printed immediately, but it takes a second until 'end' appears because function
a
seems to be exited with a delay. If you multiply list_devices() the delay becomes longer.It seems very odd that a function that prints the result then takes additional time to exit, seemingly doing nothing at all. Is there some blocking stuff in InputDevice destructors going on? It seems the delay happens as soon as the InputDevice objects are not needed anymore.