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

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

#368 in Concurrency

Download history 21/week @ 2024-09-22 225/week @ 2024-09-29 59/week @ 2024-10-06 12/week @ 2024-10-13

734 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

~2.9–8MB
~66K SLoC