|
|
|
|
|
by bsaul
2685 days ago
|
|
concurrency is still a work in progress for swift, so yes gcd still requires extra care to manipulate. if you want to stick to a pattern, i recommend the actor pattern : create big objects that receive commands (as struct, not class) from any thread but immediately queue them in their own private queue to be processed serially. That’s the most robust and no-brainer pattern, and the unofficial long term target for swift concurrency anyway. You can use operation and operationqueue classes as building blocks. |
|