Skip to content

Crash when calling enumerate from different threads (not simultaneously) #148

@prusnak

Description

@prusnak

transfered from bitcoin-core/HWI#659

reproducer:

import hid
import threading

def e():
    m.acquire()
    print(hid.enumerate())
    m.release()

m = threading.Lock()

a = threading.Thread(target=e, args=())
b = threading.Thread(target=e, args=())
c = threading.Thread(target=e, args=())

a.start()
b.start()
c.start()

a.join()
b.join()
c.join()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions