Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gst-plugins-rs gst-plugins-rs
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • François Laignel
  • gst-plugins-rsgst-plugins-rs
  • Merge requests
  • !1

ts/executor: replace tokio with smol-like implementation

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed François Laignel requested to merge smol-like-ts-runtime into master Dec 14, 2021
  • Overview 0
  • Commits 507
  • Pipelines 1
  • Changes 189+

The threadshare executor was based on a modified version of tokio which implemented the throttling strategy in the BasicExecutor. Upstream tokio codebase has significantly diverged from what it was when the throttling strategy was implemented making it hard to follow. This means that we can hardly get updates from the upstream project and when we cherry pick fixes, we can't reflect the state of the project on our fork's version. As a consequence, tools such as cargo-deny can't check for RUSTSEC fixes in our fork.

The smol ecosystem makes it quite easy to implement and maintain a custom async executor. This MR imports the smol parts that need modifications to comply with the threadshare model and implements a throttling executor in place of the tokio fork.

Networking tokio specific types are replaced with Async wrappers in the spirit of smol-rs/async-io. Note however that the Async wrappers needed modifications in order to use the per thread Reactor model. This means that higher level upstream networking crates such as async-net can not be used with our Async implementation.

Based on the example benchmark with ts-udpsrc, performances seem on par with what we achieved using the tokio fork.

Fixes gstreamer/gst-plugins-rs#118 (closed)

Related to gstreamer/gst-plugins-rs!604 (merged)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: smol-like-ts-runtime