Crate thin_main_loop

Source
Expand description

A thin main loop library for desktop applications and async I/O.

See README.md for an introduction and some examples.

Modules§

future
0.3 Futures support

Structs§

CbHandle
Abstraction around unix fds and windows sockets.
CbId
Callback Id, can be used to cancel callback before its run.
IOReader
The most common I/O object is one from which you can read asynchronously. This is a simple convenience wrapper for that kind of I/O object.
MainLoop

Enums§

IODirection
Selects whether to wait for a CbHandle to be available for reading, writing, or both.
MainLoopError
Possible error codes returned from the main loop API.

Traits§

IOAble
Represents an object that can be read from and/or written to.

Functions§

call_after
Runs a function once, after a specified duration.
call_asap
Runs a function as soon as possible, i e, when the main loop runs.
call_interval
Runs a function at regular intervals
call_io
Calls IOAble’s callbacks when there is data to be read or written.
call_thread
Runs a function on another thread. The target thread must run a main loop.
terminate
Terminates the currently running main loop.