4 ms·
GCD is just a convenience wrapper around thread pool. Probably inspired by Windows thread pool API introduced in Vista few years before GCD, adding API function
by Const-me 7y ago
GCD is just a convenience wrapper around thread pool. Probably inspired by Windows thread pool API introduced in Vista few years before GCD, adding API functions like SubmitThreadpoolWork.
Even on PCs with tons of resources, thread pools and coroutines are not always interchangeable.
One reason is performance, accessing a cache line shared across cores is even more expensive than cache miss.
Besides performance, writing same data from multiple threads, or doing in parallel what must be running sequentially, is a common source of bugs.