0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 04:02:15 +02:00
openvpn3/openvpn/apple
Lev Stipakov 07e7a0c237
maclife.hpp: synchronize start and stop of lifecycle thread
A main thread might attempt to stop livecycle thread by stopping the runloop
and waiting on joining the lifecycle thread. However if this happens
before lifecycle thread has started runloop, main thread will hang on join
since runloop won't be stopped.

Fix by introducing atomic bool "halt" flag, which is set in the main
thread when it wants to stop the livecycle thread. Before starting runloop,
a one-shot timer task is scheduled to be executed, which checks halt
and stops runloop if needed.

Fixes OVPN3-992.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2023-07-19 22:13:00 +02:00
..
cf Reformatting source code to new coding style 2023-01-18 19:24:15 +01:00
iosactiveiface.hpp Reformatting source code to new coding style 2023-01-18 19:24:15 +01:00
maclife.hpp maclife.hpp: synchronize start and stop of lifecycle thread 2023-07-19 22:13:00 +02:00
macsleep.hpp Reformatting source code to new coding style 2023-01-18 19:24:15 +01:00
macver.hpp Reformatting source code to new coding style 2023-01-18 19:24:15 +01:00
reach.hpp Reformatting source code to new coding style 2023-01-18 19:24:15 +01:00
reachable.hpp Reformatting source code to new coding style 2023-01-18 19:24:15 +01:00
scdynstore.hpp Reformatting source code to new coding style 2023-01-18 19:24:15 +01:00
ver.hpp Reformatting source code to new coding style 2023-01-18 19:24:15 +01:00