Skip to content

Fix synchronisation #114

Open
Open
@lgrahl

Description

@lgrahl

This library is not thread-safe and thus does not need synchronisation. All synchronized blocks and synchronised lists etc. should be removed/replaced.

Since the WebSocket implementation does use threads internally, we still need synchronisation between it and the public API surface. I see a couple of options:

  1. Make everything synchronized.
  2. Introduce an API to hand in a lock from the application that is being used for pretty much everything.
  3. Get rid of the WebSocket threads and allow this library to be run single-threaded (my preference, mid-term).
  4. Remove the WebSocket transport. Create a transport interface and let the application create its own WebSocket transport (my preference, long-term).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions