What is the iOS (or RubyMotion) idiom for waiting on a block that executes asynchronously?

后端 未结 4 1177
醉梦人生
醉梦人生 2021-01-03 12:59

I have been pulling my hair out for weeks on this niggling problem, and I just can\'t find any info or tips on how or what to do, so I\'m hoping someone here on the RubyMoti

4条回答
  •  死守一世寂寞
    2021-01-03 13:13

    You can also use synced queues.

    Dispatch::Queue.new('name').sync
    
    Dispatch::Queue.main.sync
    

    Take a look at more examples of usage: http://blog.arkency.com/2014/08/concurrent-patterns-in-rubymotion/

提交回复
热议问题