suspend/resume

thread_resume(xnu)
ResumeThread(win32)
noimpl(linux使用cond/atomic模拟)
如何在join前启动线程 yield并检查是否启动(or pthread_kill?) 有点像冷启动
pthread_yield_np(mac)/sched_yield

虚假唤醒

=> 等待被打断 使用while判断 重新等待

ThreadPool

C++11 https://github.com/progschj/ThreadPool
POSIX https://github.com/mbrossard/threadpool
AutoGrow https://github.com/lzpong/threadpool

闲话Swift协程

https://www.bennyhuo.com/2021/10/11/swift-coroutines-01-intro/

deadlock

Low cost runtime deadlock detection with checkpoints history
thread-liveness-monitor
gdb-automatic-deadlock-detector

c89

c89atomic
c89thread
Small, portable implementation of the C11 threads API
tinycthread