aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2025-12-31 11:51:35 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2025-12-31 11:53:20 -0500
commit1d071010c2bec860e62371cfb70f2e12a7d00563 (patch)
tree53b3a077f9cbd7d41d530cb7d54eb03716a97633 /CMakeLists.txt
parent059519c39bb7d452d651e7dc440594251966c88b (diff)
downloadstasis-1d071010c2bec860e62371cfb70f2e12a7d00563.tar.gz
Update multiprocessing to use semaphoresemaphore
* Introduce a small public domain timespec handling library * Renamed MultiProcessingTask members _now and _seconds to _interval_start and _interval_stop * Added interval_elapsed member * Change elapsed member from type int to double * mp_pool_free no longer tries to free semaphores with empty names * semaphore_init uses the correct default value of 1 instead of 2. The bug was related to calling semaphore_wait before the child() process started and semaphore_post after the parent exited. Now we post before the child to prevent a deadlock * Replace sleep with usleep in mp_pool_join. Set to 100ms. * Replace time() with clock_gettime() (helper functions created to prevent mistakes) * Stop recording time when the process ends. This fixes a bug where a process ends and up to 3 different elapsed times were reported to the user. * Progress output is now always available, not only when pid > 0 * Implement seconds_to_human_readable and hook it up to progress reporting calls. Breaking down thousands of seconds in my head after a long run was mentally exhausting. * Cleaned up some if-statements; removed else-if for clarity * Implemented a global timeout for pool tasks * Add register_semaphore() and semaphore_handle_exit() to aid with clean up. On Darwin a dangling shared memory file will lead to unexpected failures. These are destroyed via atexit().
Diffstat (limited to 'CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions