aboutsummaryrefslogtreecommitdiff
path: root/docs/src
diff options
context:
space:
mode:
authorJamie Davis <davisjam@vt.edu>2018-03-15 15:21:05 -0400
committerSantiago Gimeno <santiago.gimeno@gmail.com>2018-07-06 23:02:46 +0200
commitf401e67b609458715d4e9895c1be11f8486a638f (patch)
tree6522573bc0ba8062ce76eab6a9d4731a3eff3290 /docs/src
parent5124b27d355a868a07c51ca694c45b32b10f89b5 (diff)
downloadlibuv-f401e67b609458715d4e9895c1be11f8486a638f.tar.gz
libuv-f401e67b609458715d4e9895c1be11f8486a638f.zip
test: make test-condvar call uv_cond_wait
Problem: The condvar tests could pass without uv_cond_wait (or uv_cond_timedwait) ever being invoked. Solution: Introduce semaphores to enforce ordering. Now there will always be a thread waiting on the condition when a signal() occurs. Gotchas: 1. On Windows, waiting for a timeout may return earlier than requested, depending on the granularity of timer ticks. 2. Timeout bounds are tuned based on our CI machines. Bonuses: 1. I added additional test cases to complete the test matrix. 2. It seemed to me that several of the condvar tests were redundant, because they used timing to probabilistically explore cases where there would be "missed connections" (signal without a waiter). Because it was not clear to me what the purpose of such tests were, I have removed them. Fixes: https://github.com/libuv/libuv/issues/1714 PR-URL: https://github.com/libuv/libuv/pull/1718 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Diffstat (limited to 'docs/src')
0 files changed, 0 insertions, 0 deletions