If I have a bunch of tasks running on a concurrent queue, is it safe for those tasks to add something to a shared array? There's no reading happening here, just writing.
Asked
Active
Viewed 53 times
0
-
1In my opinion, you could use `@synchronized` for your purpose. – nynohu Nov 14 '16 at 06:28
-
1Possible duplicate of [Create thread safe array in swift](http://stackoverflow.com/questions/28191079/create-thread-safe-array-in-swift) or [Adding items to Swift array across multiple threads causing issues (because arrays aren't thread safe) - how do I get around that?](http://stackoverflow.com/questions/28784507/adding-items-to-swift-array-across-multiple-threads-causing-issues-because-arra). – Martin R Nov 14 '16 at 06:31