Crates.io | rework |
lib.rs | rework |
version | 0.1.0 |
source | src |
created_at | 2022-08-25 17:36:34.965293 |
updated_at | 2022-10-11 14:14:21.208841 |
description | Multi-threaded task processing in the Master-Worker pattern. |
homepage | |
repository | https://github.com/kkaatii/rework/ |
max_upload_size | |
id | 652320 |
size | 50,135 |
Multi-threaded async task processing in the Master-Worker pattern.
A rework
system consists of a dispatcher and multiple workers. The dispatcher receives work requests via its Handle
and schedules work with the help of a Scheduler
. The way workers process incoming requests is defined by a WorkFn
which takes a request and asynchronously generates a response.
The dispatcher, as well as every worker, runs on its dedicated thread. Although the concrete Request
type must be Send
, the response futures do not have to, allowing workers to leverage !Send
mechanisms, e.g., thread locals.
!Send
futures.Workload
is properly defined.