Supplemental Material

This chapter contains things that didn't make sense to include in the main presentation.

Tangled Output

We would like to generate a tangled (runnable) version of this document. It should be written to: events.fs It will contain everything that is normally run.

events.fs +≡
*

Overall Order

* +≡
test tools
required headers
worker count
request structure
lock and count
requests queue
results queue
worker implementation
startup routine
enqueue a request
issue requests
implement waiting
relevant constants
forth to c declarations
closures
dispatch events
add sugar
do startup
general tests
do shutdown

Testing Tools

We'll also define some generic test tools.

test tools +≡
: assert ( n -- ) 0= if abort then ;
: assert= ( a b -- ) = assert ;

Startup and Shutdown

do startup +≡
async-startup

do shutdown +≡
async-shutdown