24 Apr 2016
Version 0.2.0 of the Good Job Event Loop
is now live on crates.io.
The major change in this release is that all of the
I/O code has been split out into a separate crate
The main gj crate still defines the core
but gjio implements all the specifics about how events are
received from the outside world.
is the hook that allows gj to use those specifics.
If for whatever reason you decide you don’t like gjio, you can write your own
EventPort impelemention and still use gj.
As I’ve moved the
gj::io module into its own crate,
I’ve taken the opportunity to iterate somewhat on the design.
Probably the most prominent change is
that the methods of
self by reference
rather than by move, which I think is an ergnomonic win.
Judge for yourself by checking out the
of a TCP echo example.
A notable under-the-hood change is that, unlike the old
the new gjio crate implements its own custom low level
for calling the non-blocking I/O interfaces of Linux, OSX, and Windows.
Doing so requires less code than you might think,
especially because native nonblocking I/O model on Windows
is a good match for the completion-based interfaces of gjio’s