Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dispatch time forever in Swift 3

I have an app written in Swift 2. And there is a line like this.

semaphore.wait(timeout: dispatch_time_t(DISPATCH_TIME_FOREVER));

but this line shows as an error in Swift 3. How can I convert this to Swift 3.

Please help me. Thanks

like image 678
user1960169 Avatar asked Jan 17 '17 05:01

user1960169


1 Answers

You can convert it like this semaphore.wait(timeout: .distantFuture)

like image 88
Andrey Volobuev Avatar answered Nov 03 '22 22:11

Andrey Volobuev