SC::Async
SC::Async
has been the main focus of the month.
Simplification:
- Remove one state throughout the system (
Teardown
)
Consistency:
- Expose callback to signal when a request is fully stopped after issuing a
AsyncRequest::stop()
.
Features:
- Exclude specific request from active count (it will not keep the loop alive)
- Enumerate all (non-internal) active and submitted async requests
- Interrupt event loop even with active requests
- Update loop time externally
- Check request state (free / active / cancelling)
Stability:
- Fix issues with
AsyncWakeUp
onio_uring
Timers (AsyncLoopTimeout
) improvements:
- Invoke timers consistently when one of them is being cancelled during another timer's callback.
- Sort timers by expiration time (first) and insertion order (second)
- Use Monotonic clock everywhere
- Unify code on all backends (including
io_uring
)
Detailed List of commits:
- Async: Add a callback to signal when AsyncRequest is fully closed after stop()
- Async: Add method to check if event loop is initialized
- Async: Add method to enumerate all requests of the event loop
- Async: Add methods to check if a request is free/active/cancelling and update loop time
- Async: Allow excluding a specific request from active count
- Async: Allow interrupting event loop even with active requests
- Async: Do not enumerate internally created requests
- Async: Enforce temporal ordering of loop timeouts
- Async: Expose callback to notify before and after polling for IO
- Async: Fix AsyncWakeUp on io_uring
- Async: Fix expired timers invocation when they're being cancelled
- Async: Make teardownAsync static function
- Async: Reduce AsyncEventLoop size
- Async: Remove Teardown state to reduce complexity
- Async: Split AsyncTest in multiple files for easier navigation
- Async: Update time in any case after a kernel sync operation
- Async: Use Monotonic clock everywhere
- Async: When interrupted loop shouldn't dispatch completions
SC::AsyncStreams
Some minimal work as been done to the SC::AsyncStreams
library as well.
One video has been recorded Showing how to move the transform stream compression operation on a background thread, using AsyncLoopWork
.
This video pauses (for now) the series of videos dedicated to SC::AsyncStreams
.
Detailed List of commits:
- AsyncStreams: Compress on separate thread on zlib transform stream
- AsyncStreams: Fix zlib api calling convention
SC::Foundation
SC::Foundation
most notable change has been using a different approach in SC::Function
.
We're now using a vtable
-like approach that allows saving one entire pointer (!!) for each SC::Function
instance.
The price to pay is the static initialization (that will require a mutex
acquisition) and one more indirection, but it has been considered a good tradeoff.
Detailed List of commits:
- Foundation: Add a basic test for HeapBuffer
- Foundation: Add explicit size for Linux on OpaqueObject
- Foundation: Use static vtable approach in Function to reduce its size
SC::Time
The SC::Time
library got user defined literals, some conversion between different units and differentiation between monotonic and realtime clocks.
A nasty bug regarding time normalization in SC::Time::HighResolutionCounter
has been fixed too!
Detailed List of commits:
- Time: Add User defined literals and more conversions between types
- Time: Differentiate between Monotonic and Realtime clocks
- Time: Handle time normalization in HighResolutionCounter
Minor changes
And these are some minor changes that don't have enough impact to deserve a dedicated comment.
Detailed List of commits: