0

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.

Peter Parker
  • 2,121
  • 1
  • 17
  • 23
  • 1
    In my opinion, you could use `@synchronized` for your purpose. – nynohu Nov 14 '16 at 06:28
  • 1
    Possible 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

0 Answers0