FixIO Documentation

Back to summary

Global functions

Asynchronous I/O

import "io/async";

function async_process()
function async_process(timeout: Integer)
Start processing asynchronous I/O. You can provide a timeout: negative value means infinite waiting (the default) and zero means no blocking. The timeout is in milliseconds. The return value is zero unless async_quit function is used to pass another return value.
function async_run_later(delay: Integer, callback, data)
Schedules running a callback at a later time. When the delay is zero, the callback is run immediatelly on the next processing of events. The callback must have this signature:
function callback(data)
function async_quit()
function async_quit(ret_value)
Requests aborting current processing of asynchronous I/O. Optionally you can provide a return value that is then returned form the async_process function. Does nothing when not inside the processing.