| Crates.io | rfs-runner |
| lib.rs | rfs-runner |
| version | 0.1.4 |
| created_at | 2025-05-12 08:12:23.355199+00 |
| updated_at | 2025-05-14 18:23:20.37999+00 |
| description | A simple UI Progress |
| homepage | |
| repository | https://github.com/rootfebri/rfs-runner |
| max_upload_size | |
| id | 1670203 |
| size | 73,603 |
my helper
WorkerPool::sigint hook.Note: You'll need to replace rfs-runner with the actual name of your crate and ensure WorkerPool, DefaultTemplate, and MainProgress are correctly exposed from your library's public API. The example assumes DefaultTemplate is a struct implementing WorkerTemplate.
Key components:
WorkerPool<D, S>: Manages the workers.
new(num_cpus: usize, template: S): Creates a new pool.spawn_worker<F, Fut>(&mut self, f: F) -> Uid: Spawns a new worker.send_seqcst(&mut self, data: D) -> Result<(), D>: Sends data to the next available worker.send_to(&mut self, id: Uid, data: D) -> Result<(), D>: Sends data to a specific worker.join_all(self): Waits for all workers to finish.sigint(&mut self): Handles SIGINT for graceful shutdown.WorkerTemplate (trait): Defines the styling for progress bars.
DefaultTemplate is an example implementation.MainProgress<S>: Handles progress bar creation and updates.Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)Distributed under the MIT License. See LICENSE for more information.
Project Link: rfs-runer