3 releases

0.1.2 May 29, 2019
0.1.1 Jan 19, 2018
0.1.0 Jan 7, 2018

#1561 in Asynchronous

Download history 57/week @ 2024-03-25 139/week @ 2024-04-01 19/week @ 2024-04-08 34/week @ 2024-04-15 37/week @ 2024-04-22 36/week @ 2024-04-29 45/week @ 2024-05-06 35/week @ 2024-05-13 27/week @ 2024-05-20 26/week @ 2024-05-27 31/week @ 2024-06-03 33/week @ 2024-06-10 28/week @ 2024-06-17 31/week @ 2024-06-24 4/week @ 2024-07-01 13/week @ 2024-07-08

87 downloads per month
Used in 11 crates (6 directly)

MIT license

10KB
143 lines

fibers_tasque

Documentation Build Status Code Coverage License: MIT

A tasque extension specialized for fibers.

Documentation.


lib.rs:

A tasque extension specialized for fibers.

This provides an extension trait and the default task queues.

Examples

use fibers::{Executor, InPlaceExecutor};
use fibers_tasque::{AsyncCallError, DefaultCpuTaskQueue, DefaultIoTaskQueue, TaskQueueExt};

let mut executor = InPlaceExecutor::new().unwrap();

let future = DefaultCpuTaskQueue.async_call(|| 1 + 1);
assert_eq!(executor.run_future(future).unwrap(), Ok(2));

let future = DefaultIoTaskQueue.async_call(|| -> () { panic!() });
assert_eq!(executor.run_future(future).unwrap(), Err(AsyncCallError));

Dependencies

~3MB
~62K SLoC