This blocks the main thread but executes the code on another thread.
这阻塞了主线程但是在另一个线程上执行代码。
Because the main thread is solely responsible for multiplexing between all clients, we cannot afford to allow it to block.
因为主线程单独负责所有客户机间的多路复用,因此我们不能让它阻塞。
In this model, called Pipelining, the main thread is used to loop through the results as they are produced by the other threads.
在这个被称为“并行管道”的模型下,主线程将会在另一个线程产出结果的同时进行循环处理。
When an SPU thread gets created, the library will create a new thread that manages the SPU context asynchronous to the main thread.
在创建一个SPU线程时,这个库就创建一个新线程,它负责管理与主线程异步的spu上下文。
Any long running operation that operates on the main thread will cause an application to freeze up.
任何在主线程上运行的这类操作都会导致应用程序冻结。
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.
此函数的惟一缺陷是:它在主线程上执行,因此,在此期间,它会阻塞与用户的任何交互。
As such, the main thread is also sometimes called the UI thread.
因此,主线程有时也被叫做UI线程。
One issue that was found after the release of MacRuby 0.6 seems to cause problems with scheduling a block to run on the main thread from a background thread.
MacRuby 0.6发布之后,用户发现了一个问题,在运行某代码段的时候,从后台线程切换到主线程会导致程序崩溃。
However, immediately after the second create call returns, the main thread can't assume which thread (a or b) will actually start running first.
然而,就在第二个create调用返回后,主线程无法假定是哪一个线程(a或b)会首先开始运行。
That data is also available to the main thread by accessing the data property of the message it receives.
主线程也可以通过访问它接收到的消息的data属性来访问该数据。
After the second pthread_create call, both the main thread and thread "b" can assume that thread "a" exists (or has stopped).
第二个pthread_create调用后,主线程和线程b都可以假定线程a存在(或已停止)。
The lock function main thread gets the result from the child thread.
lock函数主线程从子线程获得结果。
Main thread: Lock mutex and increment threadcount.
主线程:锁定互斥量并增量threadcount。
When you finish processing the data in the Worker script, you invoke the postMessage function to send data back to the main thread.
当您处理完Worker脚本中的数据时,调用postMessage函数将数据返回主线程。
So we see another issue with running on the UI thread and outputting information to the console: the whole pluglet has to end before any output from the main thread is sent to the console.
因此我们发现了在UI线程上运行pluglet并输出信息到控制台上的另一个问题:整个pluglet必须在主线程的任何一个输出被发送到控制台之前结束。
Main thread: Call pthread_create .
主线程:调用pthread_create 。
This transforms the main thread of the calling process into the control dispatcher.
这将把调用进程的主线程转换为控制分派器。
The main thread writes bytes read from the channel into the pipe.
主线程把从通道读取的数据写到管道中。
If no message is found, the main thread sleeps for 10 seconds.
如果未找到任何消息,主线程休眠10秒钟。
Now the result of the request must be made available to the main thread.
现在,请求的结果必须在主线程中可用。
A main thread will listen to the buffered queue and will service the requests it receives.
主线程会侦听缓冲队列,并服务其接收的请求。
The main thread watches the world and reports on the invasion's progress.
主线程监守世界并报告入侵进度。
Background tasks will use the DataFlowStream to stream result tweets back to the main thread that reads them from the stream.
后台任务将使用DataFlowStream来将结果tweets流式传输回主线程,该主线程从数据流中读取它们。
When the worker finishes its work, it will send a message back to the main thread.
当此worker完成其作业后,它会向主线程发送回一个消息。
The article also explains the API that your application can use to interact with Android UI toolkit components running on the main thread and spawn managed worker threads.
同时本文还会对应用程序与主线程中的AndroidUItoolkit组件交互以及产生托管工作线程的API进行解释。
When the SPU needs to do any standard library calls like printf or exit, it has to call back to the main thread.
当SPU需要执行任何标准的库调用时,例如 printf或exit,它都需要回调主线程。
This is the function that is called whenever the worker sends data back to the main thread.
这个函数将在 worker向主线程返回数据时被调用。
Without the mutex, thread_function will overwrite the incremented value when it wakes up if our main thread increments myglobal during thread_function 's one-second nap.
不使用互斥对象时,即使主线程在thread_function线程睡眠一秒钟期间内对myglobal加一,thread_function苏醒后也会覆盖主线程所加的值。
To clarify these three issues on the basis of their own, we use "understand" as the main thread, and do a brief comparative analysis, trying to draw some useful views.
在先弄清楚这三个不足的基础上,以理解为主要线索,对它们做简要的比较浅析浅析,试图得出一些有益的看法。
应用推荐