docs.rs failed to build sod-crossbeam-0.3.4
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
sod-crossbeam-0.3.1
sod-crossbeam
sod::Service
implementations to interact with crossbeam
queues.
Service Impls
ArrayQueuePusher
pushes to acrossbeam::queue::ArrayQueue
ArrayQueueForcePusher
force pushes to acrossbeam::queue::ArrayQueue
ArrayQueuePopper
pops from acrossbeam::queue::ArrayQueue
SegQueuePusher
pushes to acrossbeam::queue::SegQueue
SegQueuePopper
pops from acrossbeam::queue::SegQueue
Async
Any of the services can be represented as an AsyncService
using self.into_async()
.
use crossbeam::queue::ArrayQueue;
use sod::{PollService, Service};
use sod_crossbeam::ArrayQueuePopper;
use std::{sync::Arc, time::Duration};
let q = Arc::new(ArrayQueue::<i32>::new(128));
let async_popper = ArrayQueuePopper::new(Arc::clone(&q)).into_mut();
Blocking
sod::PollService
may encapsulate a ArrayQueuePopper
or SegQueuePopper
to provide a backoff mechanism to avoid busy-spinning the CPU in a poll loop.
use ArrayQueue;
use ;
use ArrayQueuePopper;
use ;
let q = new;
let popper = new;
loop
sod::RetryService
may encapsulate a ArrayQueuePusher
to block and continuously retry pushing an element to an ArrayQueue
until it succeeds.
use ArrayQueue;
use ;
use ArrayQueuePusher;
use Arc;
let q = new;
let pusher = new;
pusher.process.unwrap;
pusher.process.unwrap;