Tom
c33d45b92f
cmake: do not include subdirectory 'test' if building all
2021-05-19 12:32:25 +02:00
Tom
b72a7e76d9
github/workflow: use clang version 12
...
Clang's ThreadSanitizer in version 10 and 11 emits a false positive
when using condition variables ("WARNING: ThreadSanitizer: double lock
of a mutex").
This was fixed in version 12 (google/sanitizers#1259 ).
2021-05-18 02:42:42 +02:00
Tom
9143edba0e
github/workflow: run 'Info' step first
2021-05-18 02:40:04 +02:00
Tom
91534ec8be
example: add missing include <thread>
2021-05-18 02:38:13 +02:00
Tom
09755a8cae
test: add missing include <thread>
2021-05-17 20:52:30 +02:00
Tom
ef2bf28c3d
github/workflow: use catch2 from stable branch
2021-05-17 20:07:45 +02:00
Tom
6dc4c3b3b5
readme: add section 'Using signal-wrangler with CMake'
2021-05-17 19:55:10 +02:00
Tom
b04f2a4697
test: add case signal-handler-throws
2020-08-01 17:37:52 +02:00
Tom
5e402f8dbf
github/workflow: build in release and debug mode
2020-08-01 14:50:14 +02:00
Tom
fe0e0ed2cc
github/workflow: reduce verbosity when running sgnl-test
2020-08-01 14:29:08 +02:00
Tom
b9c7b4b935
github/workflow: add clang++
2020-08-01 14:28:24 +02:00
Tom
bc4e2b7881
AtomicCondition: add deduction guide for CTAD
...
Fixes clang warning '-Wctad-maybe-unsupported'.
2020-08-01 14:27:05 +02:00
Tom
1f8522952b
do not use CTAD for std-types if no deduction rule defined
...
Fixes clang warning '-Wctad-maybe-unsupported'.
2020-08-01 14:24:37 +02:00
Tom
311cb6e02a
SignalHandler: report signal number if sigaddset fails
2020-08-01 14:21:51 +02:00
Tom
12a20a52b0
test: remove unused variable
2020-08-01 14:20:28 +02:00
Tom
85d3f93f51
example: move free function to anonymous namespace
2020-08-01 14:19:03 +02:00
Tom
467648269c
example: add missing includes
2020-08-01 14:18:12 +02:00
Tom
63535dc16c
test: do not accidentally kill parent process
...
Use `kill(getpid(), ...)` instead of `kill(0, ...)`.
`kill(0, ...)` sends a signal to the whole process group, not just the
currently executing process. The process group may include a parent
process, for example a bash subshell spawned for a script.
2020-08-01 02:05:43 +02:00
Tom
7857a565b4
github/workflow: include successful tests in sgnl-test output
2020-07-18 01:41:49 +02:00
Tom
e4c6e7adeb
github/workflow: fix typo
2020-07-18 01:34:42 +02:00
Tom
cf3e787279
github/workflow: split up steps into small pieces
2020-07-18 01:33:33 +02:00
Tom
999814c9ff
github/workflow: add timeout
2020-07-18 01:26:08 +02:00
Tom
e824962b85
github/workflow: install dependency 'catch2'
2020-07-18 00:40:00 +02:00
Tom
af223944b6
github/workflow: do not abort if build directory exists
2020-07-18 00:26:01 +02:00
Tom
9ea3db19c3
add github workflow
2020-07-18 00:21:44 +02:00
Tom
562a037c39
example: prefer helper methods
2020-07-18 00:20:54 +02:00
Tom
6382be9907
cmake: bump version to 0.3.0
2020-07-17 23:37:44 +02:00
Tom
f62a81797a
AtomicCondition: add wait*_value helpers
2020-07-17 23:37:33 +02:00
Tom
fed1e55a23
cmake: rename project to signal-wrangler
2020-07-17 17:05:04 +02:00
Tom
7636620625
SignalHandler: add helper async_sigwait_handler
2020-07-17 16:51:53 +02:00
Tom
346c835468
AtomicCondition: add helpers set_and_notify_{one,all}
2020-07-17 16:50:51 +02:00
Tom
e69a62cf9d
SignalHandler: add missing const
2020-07-17 15:46:06 +02:00
Tom
cc4305ace3
SignalHandler: mark destructor noexcept
2020-07-17 15:43:28 +02:00
Tom
d10857c13d
readme: inline example.cpp
2020-07-14 15:42:58 +02:00
Tom
8213147d00
readme: fix typo
2020-07-14 10:15:53 +02:00
Tom
a033c096df
readme: add syntax hl
2020-07-13 21:16:03 +02:00
Tom
921daa85bb
readme: fix typo in example
2019-11-27 18:03:34 +01:00
Tom
5046c3918e
readme: add Catch2 to dependencies
2019-10-13 15:11:06 +02:00
Tom
f33e820a16
add example using threads
2019-10-13 15:06:50 +02:00
Tom
9af897fa3b
v0.2
...
* Preserve interface of std::condition_variable through "perfect
forwarding"
* Decouple SignalHandler and AtomicCondition
* Callback function for signals
* Improve readme
* Bump version to v0.2
2019-10-13 15:00:20 +02:00
Tom
9aaa7180fc
cmake: disable testing, do not build test when building all
2019-10-13 14:53:45 +02:00
Tom
7da937d750
cmake: make sure only header files with *.h pattern are installed
2019-10-13 14:31:16 +02:00
Tom
52dca2ac50
use typename
for template parameters
2019-10-02 16:59:22 +02:00
Tom
2a04dd5cc1
AtomicCondition: fix race condition, remove notify_{one,all}
...
* Fix race condition in wait_for between calling atomic load
and condition_variable::wait_for, by protecting atomic store
with same mutex as AtomicCondition::wait_for.
* Subsequently, simplify the interface by removing notify_{one,all}.
condition_varaiable::notify_all is now automatically called in
`AtomicCondition::set(val)`.
2019-09-23 12:04:28 +02:00
Tom
2ecc643bc5
readme: add build instructions
2019-09-16 18:14:15 +02:00
Tom
1438cfc697
test: add cases wait-for-value and wait-for-predicate
2019-09-16 18:13:18 +02:00
Tom
d96e699f95
test: worker: wait for hours, so failure becomes apparent
2019-09-16 18:12:53 +02:00
Tom
21b8c7ca8b
test: add case signal-handler-reuse
2019-09-16 18:11:13 +02:00
Tom
5708d49a1a
AtomicCondition: add wait_for with predicate, add notify_one
2019-09-16 18:07:58 +02:00
Tom
1146362559
AtomicCondition::wait_for: use std::chrono::duration
2019-09-16 18:07:20 +02:00