Skip to content

Documentation is unclear about thread safety #352

@jleben

Description

@jleben

The documentation repeatedly states that "libusb is thread safe", without clarifying what exactly is meant by that.

Is calling libusb_handle_events with the same parameter from multiple threads thread safe? Based on the documentation, I can guess: probably yes (although not certainly).

Is calling libusb_fill_bulk_transfer with the same parameters from multiple threads thread safe? Based on my experience and common sense, I would guess: probably no (although I can think of an implementation where it is).

Other functions may have various degrees of uncertainty about thread safety.

The claim of thread safety should be applied to individual functions, and the conditions for thread-safety should be clearly specified.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions