µEvLoop
A fast and lightweight event loop aimed at embedded platforms in C99.
|
Defines a single synchronous operation to be invoked when the promise is either resolved or rejected. More...
Data Fields | |
uel_closure_t | resolve |
The closure to be invoked when the promise is resolved. | |
uel_closure_t | reject |
The closure to be invoked when the promise is rejected. | |
uel_promise_segment_t * | next |
The next synchronous segment to be processed. | |
Defines a single synchronous operation to be invoked when the promise is either resolved or rejected.
A promise segment is a data structure that defines how to process a value yielded by a promise when it resolves or rejects.
Segments contain two closures, representing success and error execution paths. Once the promise containing a segment is settled, depending on its state, either closure is invoked with the promise as parameter.
If a handler closure returns anything different that NULL, it's assumed to be a promise pointer to be awaited for.