Skip to content

InputDevice destructor blocks #144

Description

@sezanzeb
#!/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.

  • Python 3.8.5 (default, Sep 5 2020, 10:50:12)
  • extra/python-evdev 1.3.0-1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions