Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: