Skip to content

Use polling instead of thread::sleep #49

Description

@jprochazk

On native, we always block the thread using a thread::sleep/thread::yield_now after a read. The reason we sleep on those threads is to not busy-loop that CPU core. We should instead set the socket to non-blocking mode and poll it using native polling APIs. This would be useful for senders as well.
We use polling in Rerun, and it has a reasonably small footprint, so should be fine to add as a dependency here as well.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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