Fixed race conditions and memory safety issues in the progress example by using C11 atomic operations for proper thread synchronization. Changes: - Changed percentage from double to _Atomic double - Use atomic_store_explicit() with memory_order_release when writing - Use atomic_load_explicit() with memory_order_acquire when reading - Removed unsafe pointer passing via async.data This ensures proper memory synchronization between the worker thread and async callback, preventing data races and dangling pointer issues. Fixes #4386 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| code | ||
| src | ||
| make.bat | ||
| Makefile | ||
| requirements.txt | ||