Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Functions juptuneEventLoopSubmitEvent

1
2
3
4
5
6
7
8
9
module juptune.event.loop.async;

Result juptuneEventLoopSubmitEvent(
    Command
)(
    Command command, 
    IoUringCompletion cqe, 
    SubmitEventConfig config = SubmitEventConfig()
);

Documentation

Submits an event to be processed asynchronously.

Note that the Commandtype should be any of the IoUringXXXstructs found in juptune.event.iouring, for example IoUringAccept.

By default the fiber will be suspended until a completion is generated.

If you disable yielding via SubmitEventConfig.yieldUntilCompletethen the fiber will continue directly after calling this function, however there is currently no mechanism to observe the completion, or if a completion is even generated.

You can use IoUringCompletion.ignorefor the cqeparameter if you disable yielding, or if you don't care about the completion at all.

You can specify a timeout via SubmitEventConfig.timeout. If the timeout is exceeded then the operation will attempt to be canceled, likely causing an error result to be returned. This can be detected by calling Result.isError(LinuxError.cancelled)on the returned result object.

Definitely a lot of work left around this area, but for now this should be useable.

Generally most users don't need to actually use this function, as it should be wrapped inside a more high-level struct, such as TcpSocket.

This function will continously yield, regardless of configuration, if the submission queue is too full.

Params

Throws

Anything that yieldthrows.

ON THIS PAGE