Crates.io | gj |
lib.rs | gj |
version | 0.2.0 |
source | src |
created_at | 2015-05-13 00:55:13.202343 |
updated_at | 2016-04-24 15:49:37.049487 |
description | Event loop and promises. |
homepage | |
repository | https://github.com/dwrensha/gj |
max_upload_size | |
id | 2099 |
size | 78,978 |
EXPERIMENTAL! UNSTABLE! A WORK IN PROGRESS!
GJ is a port of the
KJ event loop
into Rust.
Its central abstraction is the
Promise<T,E>
struct
which is similar to Javascript's
Promise
class.
Promises that are chained recursively can be thought of as lightweight stackless tasks. A GJ event loop allows you to execute many such tasks on a single operating system thread and to safely share mutable data between them without any need for mutexes or atomics.
For a completion-based I/O interface built on top of GJ, see gjio.