Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • E emper
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 15
    • Issues 15
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • i4i4
  • manycore
  • emper
  • Merge requests
  • !227

[IO] add FutureSelector to multiplex waiting on multiple Futures

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Florian Fischer requested to merge aj46ezos/emper:select into master Jul 29, 2021
  • Overview 0
  • Commits 2
  • Pipelines 1
  • Changes 10

A FutureSelector is internally implemented as a Sempahore and a vector of monitored Futures. All Futures monitored by the selector know the selector and signal its semaphore on completion. When the FutureSelector's Semaphore is released the select unblocks and searches for the first ready Future in its list.

NOTE: The FutureSelector is except its Semaphore not thread-safe and must not be used in parallel. This means no Futures can be retrieved from or passed to other Fibers which would possibly result in parallel modification of the selector during Future destruction.

Edited Jul 29, 2021 by Florian Fischer
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: select