SC::AsyncLoopWork#
Executing background work with notification on event loop
SC::Async
has gained the new
SC::AsyncLoopWork
type, that allows executing blocking work in background thread, with an "after work" notification callback
called on the event loop itself.
This second notification callback can be used to update GUI or to safely modify some global state without
needing mutexes.
SC::AsyncLoopWork
is a generalization of the system used to execute file operations on thread
pool, extending it to any arbitrary blocking operation.
The addition of SC::AsyncLoopWork
has been recorded in a video.
Relevant commits:
- Async: Add AsyncLoopWork to execute callbacks in background threads on the EventLoop
- Async: Add atomic pending flags to avoid multiple invocations of wakeup in the same loop iteration
- Async: Clarify condition where getNumberofActiveHandle() can become negative
- Async: Refactoring AsyncTask to embed ThreadPoolTask
Coverage and Documentation#
Automation for GitHub CI
GitHub CI scripts are now able to generate test coverage reports and documentation.
In line with the spirit of the project, both features have been added to
SC::Tools
,
avoiding any shell scripting or use of other languages.
This means that they've been written in C++, using Sane C++ libraries to execute FileSystem operations, spawn
processes and SC::Package
to download and extract binary dependencies.
SC build coverage
generates the coverage report using clang source based coverage (and a SVG badge).SC build documentation
generates documentation using doxygen.
This means that the entire Documentation Website is now automatically built and deployed on every commit to main!
Relevant commits:
- Tools: Add build coverage
- Tools: Add build documentation
- Tools: Add build run to run default built target
- Tools: Add the -nostdlib++ flag to the bootstrap Makefile when clang is detected
- Tools: Fix incorrect build coverage regex filter
- Tools: Return errorlevel on Windows building the tool fails
- Tools: Support build documentation on Windows
- Tools: Track dependencies properly also for NMAKE on windows
- Build: Add support for C source files
- Build: Enable source based coverage when under clang
- Build: Generate coverage badge SVG
- CI: Automatically build and deploy documentation and code coverage report
- Coverage: Exclude some tests that cannot be run under XCTest
C bindings#
because Sane C++ libraries map to C really well
Most Sane C++ Libraries have been designed to nicely map to a clean C-api.
Time has come to start creating some C bindings, starting with the simplest one:
SC::Hashing
.
This
is the result.
What library do you think should be the next?
Relevant Commits:
SC::Process#
Everyone loves child processes
SC::Process
library is getting more complete.
This month it has been gaining ability to:
- Set child process working directory
- Set child process environment variables
Relevant commits:
Improvements to the Library#
Some fixes and minor additions have been delivered too, improving the entire set of libraries.- FileSystem: Fix copyFile failing when trying to clone across devices
- FileSystem: Use File library for file read and write
- Foundation: Make min and max arguments and return value references
- Strings: Add some tests for StringView::fromNullTerminated
- Strings: Add StringView::{splitAfter | trimWhiteSpaces} and StringViewTokenizer::tokenizeNextLine
- Strings: Add StringView::splitBefore
- Strings: Make StringViewTokenizer remaining StringView available as a field
- Testing: Add --quiet switch and flags to execute sections only if explicitly requested