这阻塞了主线程但是在另一个线程上执行代码。
This blocks the main thread but executes the code on another thread.
它是启动过程中隐式创建的主线程,执行main方法。
It's the main thread that is implicitly created on process startup and executes the main method.
并行性是通过运行主线程为每一个任务调度执行的子线程而实现的,这样任务就会并发执行,而每一个线程是同步执行任务的。
Parallelism is introduced by running the main thread scheduling child threads for each task so that the tasks execute concurrently while each thread execute the task synchronously.
此函数的惟一缺陷是:它在主线程上执行,因此,在此期间,它会阻塞与用户的任何交互。
The only problem with this function is that when it periodically executes, it executes on the main thread and thus blocks any interactions from the user during that time.
当SPU需要执行任何标准的库调用时,例如 printf或exit,它都需要回调主线程。
When the SPU needs to do any standard library calls like printf or exit, it has to call back to the main thread.
不过,可以创建辅助线程,以便与主线程一起并行执行代码。
However, auxiliary threads can be created and used to execute code in parallel with the primary thread.
一个布尔值,指定是否阻塞当前线程直到指定选择器在主线程中执行完毕。
Boolean that specifies whether the current thread blocks until after the specified selector is performed on the receiver on the main thread.
采集线程捕获帧数据标志信号并发送到主线程,主线程收消息,执行相应的处理。
The sign signal was captured by gathering thread and sent the message to main thread, and main thread received the message and processed it accordingly.
同步阻塞主线程和调用线程执行过程,你传递给它,所以过度使用它可以减损多线程的好处。
Synchronize blocks both the main thread and the calling thread while it's performing the procedure that you pass to it, so overusing it can detract from the benefits of multi-threading.
从我的回调函数里面,我需要调用一个函数在我的脚本定义的,但我需要的功能在主线程上执行。
From inside my callback handler, I need to call a function I've defined in my script, but I need the function to execute in the main thread.
下面的示例演示如何创建辅助线程,并用它与主线程并行执行处理。
The following example demonstrates how an auxiliary or worker thread can be created and used to perform processing in parallel with that of the primary thread.
下面的示例演示如何创建辅助线程,并用它与主线程并行执行处理。
The following example demonstrates how an auxiliary or worker thread can be created and used to perform processing in parallel with that of the primary thread.
应用推荐