函数:thread.waitAllThreadExit 协程阻塞等待

函数名称:协程阻塞等待

函数功能:阻塞等待所有协程结束,只能在主线程中使用

引擎版本:iOS v2.3.9,Android v2.3.4 以上

函数方法

thread.waitAllThreadExit()

注意事项

  • 因为主线程结束了协程会全部结束,所以使用该函数可以等待协程都结束再退出
Copyright 北京帮你玩科技有限公司 2023 all right reserved,powered by Gitbook该文章修订时间: 2024-03-06 17:50:18

results matching ""

    No results matching ""