#worker-thread #command-buffer #async #task #management #traits #sync

mvsync

A standalone async and worker thread library, with expandable traits and command buffers

12 stable releases

new 1.2.0 Apr 20, 2024
1.1.9 Feb 26, 2024
1.1.2 Jan 23, 2024
1.1.0 Oct 1, 2023

#378 in Concurrency

Download history 4/week @ 2024-01-22 6/week @ 2024-02-05 275/week @ 2024-02-12 43/week @ 2024-02-19 176/week @ 2024-02-26 5/week @ 2024-03-04 49/week @ 2024-03-11 69/week @ 2024-04-01

74 downloads per month

Custom license

84KB
1.5K SLoC

MVSync

Worker thread and sync tools management.


lib.rs:

Simple asynchronous task manager abstraction.

Provides an abstraction layer over executing asynchronous tasks over multiple threads, without re-creating threads, providing a speed increase over manually creating threads.

This crate aims to provide both a lower-level, more manual API which is highly configurable, and a higher-level API via the command-buffers feature.

Features:

  • queue: Manages tasks once they are submitted. Efficiently spreads them across threads. Prevents waiting tasks from clogging the workers, by not executing they are ready.

  • task: Abstraction layer over functions, which can be synchronous or asynchronous, take in parameters, and return a result.

  • sync: Synchronization objects which provide a way of implementing control flow.

  • block: Very simple 'poll to completion' awaiter.

  • utils: Some simple async utility functions.

  • command buffers: A higher-level API abstraction layer, which allows making custom tasks, as well as chaining tasks.

Dependencies

~2.4–3MB
~55K SLoC