mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Apple: Add pthread implementation of Thread class
This allows Apple platforms to override the default stack size of a thread in the WorkerThreadPool, which is 512KiB by default. This must be increased, as SPIRV-Cross, used by the Metal driver, can use deeply nested stacks, as can debug builds.
This commit is contained in:
parent
4248411baf
commit
8c8d6de3e7
12 changed files with 336 additions and 2 deletions
|
|
@ -140,7 +140,7 @@ TEST_CASE("[RID_Owner] Thread safety") {
|
|||
uint32_t target = (p_step / 2 + 1) * threads.size();
|
||||
sync[buf_idx].fetch_add(1, std::memory_order_relaxed);
|
||||
do {
|
||||
std::this_thread::yield();
|
||||
Thread::yield();
|
||||
} while (sync[buf_idx].load(std::memory_order_relaxed) != target);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue