Create thread safe array in Swift Create thread safe array in Swift multithreading multithreading