3 releases

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

#1749 in Asynchronous

Download history 19/week @ 2024-07-22 30/week @ 2024-07-29 34/week @ 2024-08-05 27/week @ 2024-08-12 20/week @ 2024-08-19 73/week @ 2024-08-26 9/week @ 2024-09-02 11/week @ 2024-09-09 15/week @ 2024-09-16 56/week @ 2024-09-23 12/week @ 2024-09-30 3/week @ 2024-10-07 21/week @ 2024-10-14 6/week @ 2024-10-21 15/week @ 2024-10-28 32/week @ 2024-11-04

74 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
~63K SLoC