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

mvsync

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

14 stable releases

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

#257 in Concurrency

Download history 12/week @ 2024-07-05 41/week @ 2024-07-26 6/week @ 2024-08-02 17/week @ 2024-09-20 4/week @ 2024-09-27 272/week @ 2024-10-04 21/week @ 2024-10-11

314 downloads per month

Custom license

86KB
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

~4.5–9MB
~92K SLoC