belozierov / SwiftCoroutine

Swift coroutines for iOS, macOS and Linux.
https://belozierov.github.io/SwiftCoroutine
MIT License
836 stars 51 forks source link

Thread safety of CoChannels #19

Closed wsb9 closed 4 years ago

wsb9 commented 4 years ago

Can CoChannel be cancelled from different thread than where it has been created? Ie, I create channels on DispatchQueue.global(), and cancel them later at DispatchQueue.main, as they become unneeded. But channels seem to continue working until app termination.

belozierov commented 4 years ago

@wsb9 Yes, of course, all api in library is thread safe. Сould you provide more info so I could reproduce it. Thx.

wsb9 commented 4 years ago

Actually was caused by unrelated issue, I'm sorry.