]> git.meshlink.io Git - meshlink/commit
Use condition variables to wait for threads to finish initializing.
authorGuus Sliepen <guus@meshlink.io>
Sun, 4 Aug 2019 20:22:10 +0000 (22:22 +0200)
committerGuus Sliepen <guus@meshlink.io>
Sun, 4 Aug 2019 20:22:10 +0000 (22:22 +0200)
commitdceaa0b7940464df45104e02b88e0ea3283bb938
tree4cde8fb662202d2f33cf5078c73b5e6a42907db5
parentfd7e81983ca4cae7cdf2a67a35500284f17761c4
Use condition variables to wait for threads to finish initializing.

To prevent a race condition when calling meshlink_stop() right after
meshlink_start(), we need to wait for the MeshLink and Catta threads to
finish initializing before we can return from meshlink_start().
src/discovery.c
src/meshlink.c
src/meshlink_internal.h