Lindenii Project Forge
Login

hare-aio

Asynchronous I/O event loops for Hare

Warning: Due to various recent migrations, viewing non-HEAD refs may be broken.

/aio/op.ha (raw)

// An operation context.
//
// Because we need to retreive the file descriptor, user pointer, callbacks, and
// other information related to each SQE when they come back as CQEs, we must
// encapsulate these in our own "context" structs. But each operation's context
// is different yet could not be identified without looking into user data
// itself, and we also need a way to distinguish between different types
// of events; so here's a tagged union thereof.
type op_ctx = (op_read_ctx | void); // TODO: replace void with actual other ctx's