CodePudding user response:
The GCD knowCodePudding user response:
Can you give an exampleCodePudding user response:
Can use the GCD semaphore dispatch_semaphore_t to implement, but feel so there will be a question, cause caton applicationCodePudding user response:
https://www.jianshu.com/p/2d57c72016c6This article has a detailed introduction to the use of a semaphore
CodePudding user response:
The semaphoreCodePudding user response:
Use java8 CompletableFuture or CountDownLatch or awit () to implement wait forDubbo use CompletableFuture
Canal, and some open source framework using CountDownLatch
I hope it can help you
CodePudding user response:
Then write logic ~ in the callback