[−][src]Module juggle::utils
Couple of helpful utilities.
This module contains stuff useful for:
- Dividing CPU usage between multiple tasks (
LoadBalance
). - Sharing value between threads without using locks (
AtomicCell
). - Creating
Waker
s (to_waker
,func_waker
,noop_waker
).
Structs
AtomicCell | Wrapper struct that allows modifying and swapping value without using locks. |
LoadBalance | Helper for equally dividing time slots across multiple tasks. Implements |
StdTimerClock | Basic instance of TimerClock implemented using |
TimingGroup | Helper for equally dividing time slots across multiple entries manually. |
Traits
DynamicWake | Implement this trait if you want to create custom waker with |
TimerClock | Custom time source. Implement this trait if you want to provide your own time source for
|
TimerCount | Trait implemented by data types that can be used to measure time in abstract units. |
Functions
func_waker | Returns waker that performs action from specified function pointer when waked. |
noop_waker | Returns waker that performs no action when waked. |
to_waker | Convert atomic reference counted pointer to type implementing |