소스 검색

Merge commit '40833d25262552fe96dec5acd3870d79f08f1456' into main

Sam Lantinga 2 년 전
부모
커밋
81c3343d04
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      include/SDL3/SDL_atomic.h

+ 5 - 0
include/SDL3/SDL_atomic.h

@@ -78,6 +78,11 @@ extern "C" {
  * minimize the code executed inside an atomic lock and never do
  * expensive things like API or system calls while holding them.
  *
+ * They are also vulnerable to starvation if the thread holding
+ * the lock is lower priority than other threads and doesn't get
+ * scheduled. In general you should use mutexes instead, since
+ * in general they have better performance and contention behavior.
+ *
  * The atomic locks are not safe to lock recursively.
  *
  * Porting Note: