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> |
||
|---|---|---|
| .. | ||
| cgi | ||
| default-loop | ||
| detach | ||
| dns | ||
| helloworld | ||
| idle-basic | ||
| idle-compute | ||
| interfaces | ||
| locks | ||
| multi-echo-server | ||
| onchange | ||
| pipe-echo-server | ||
| plugin | ||
| proc-streams | ||
| progress | ||
| queue-cancel | ||
| queue-work | ||
| ref-timer | ||
| signal | ||
| spawn | ||
| tcp-echo-server | ||
| thread-create | ||
| tty | ||
| tty-gravity | ||
| udp-dhcp | ||
| uvcat | ||
| uvstop | ||
| uvtee | ||
| uvwget | ||
| .gitignore | ||
| CMakeLists.txt | ||