#limiter #process #limit #multi-threading #task #system #occupancy

process_limiter

A lib which can directly limit the specified process occupancy, and support multithreading and dynamically changing occupancy

1 unstable release

0.1.0 May 20, 2023

#20 in #limiter

WTFPL license

14KB
310 lines

Process Limiter

* A lib which can directly limit the specified process occupancy, and support multithreading and dynamically changing occupancy.


Resource-limiting Rust library for specific processes, with multithreading and dynamic occupancy adjustments. Easily limits system resource usage to reduce instability and downtime, ideal for any project needing strict resource control.


lib.rs:

Examples

// Create a Limiter that generates Tasks that are actually used for control.
use process_limiter::{Limiter, LimiterExt};
let mut limiter = Limiter::new();
// Derive a Task from Limiter
let mut task = limiter.spawn();
/* Check the documentation for the Task structure to learn how to use this Task */

Dependencies

~0.7–1MB
~19K SLoC