dispatchsemaphore Questions
2
Solved
I am facing an issue in using semaphores on iOS.
I am implementing a feature to execute a series of async methods sequentially, one after another in order.
let semaphore = DispatchSemaphore(value: ...
Intermit asked 29/8, 2022 at 17:11
1
Solved
class SomeViewController: UIViewController {
let semaphore = DispatchSemaphore(value: 1)
deinit {
semaphore.signal() // just in case?
}
func someLongAsyncTask() {
semaphore.wait()
...
sem...
Hellenist asked 23/12, 2021 at 2:40
2
Solved
Apparently I can only use DispatchSemaphore if I deal with different queues. But what if I want to run async code on the same queue (in this case the main queue).
let s = DispatchSemaphore(value :...
Nonsmoker asked 28/8, 2019 at 13:14
1
© 2022 - 2024 — McMap. All rights reserved.