yyzybb537 / libgo

Go-style concurrency in C++11
MIT License
3.22k stars 757 forks source link

std::atomic_flag should use ATOMIC_FLAG_INIT instead of non-portable false #219

Open codehz opened 4 years ago

codehz commented 4 years ago

https://github.com/yyzybb537/libgo/blob/97fa7ec1285672c482090499cc452af65adca413/libgo/common/spinlock.h#L44

codehz commented 4 years ago

Reference: https://en.cppreference.com/w/cpp/atomic/ATOMIC_FLAG_INIT (and in c++20 , just {}