The purpose of the sleep is to allow the garbage collector to finish up after it has released the other threads.
休眠的目的在于给垃圾回收器充分的时间,在释放其他线程之后完成工作。
The first thread locks the mutex and appends data to the queue, while the other threads wait for their turn.
第一个线程锁住互斥并把数据添加到队列中,而其他线程等待轮到它们操作。
However this isn't a good solution because it may lock out the other threads from being able to have fair access.
但是,这并非一个很好的解决方案,因为它可能会妨碍其他线程合法的访问。
If main finishes before the threads it has created and exits with pthread_exit , the other threads continue to execute.
如果main在它创建的线程之前完成,并使用pthread_exit退出,那么其他线程将继续执行。
In this model, called Pipelining, the main thread is used to loop through the results as they are produced by the other threads.
在这个被称为“并行管道”的模型下,主线程将会在另一个线程产出结果的同时进行循环处理。
Different threads can successively call the function and modify the data without informing the other threads that are using the data.
不同的线程可能会先后调用那个函数,并且修改那些数据时不会通知其他正在使用此数据的线程。
The other threads can request the service to the server by sending a properly formatted message and then wait for the answer with the result.
其他线程可以通过向其发送一个优先级格式的消息来请求服务,然后等待结果的答复。
This is described in more detail in one of the other threads I posted in. In summary, only the actual creatures that resist feign death will completely ignore its effects.
总而言之,仅仅那个抵抗了你假死的怪物才会完全无视假死效果,该问题的详细情况已经在我发的其他一个帖子里有所反映。
Each thread can see only the value associated with that thread, and is unaware that other threads may be using or modifying their own copies.
每个线程只能看到与自己相联系的值,而不知道别的线程可能正在使用或修改它们自己的副本。
If any other threads were to read the values, you would see no change.
如果任何其他线程想要读取该值,将看不到任何变化。
In a multiprocessing environment, the processing time for a thread is related to the availability of system resources and synchronization with other threads.
在多处理环境中,线程的处理时间与可用系统资源以及与其他线程的同步有关。
Both threads will wait indefinitely for the lock on the other class loader, and so they become deadlocked.
两个线程都会无限期地等候另一个类装入器上的锁,所以它们就变成了死锁的。
You can define other threads by configuring the report widget.
您可以配置报告小部件来定义其他线程。
Thread data refers to session's thread information, the information about the primary and other threads of the session.
线程数据指的是会话的线程信息、有关该会话的基本线程和其他线程信息。
Once the thread has finished with the object, it releases it so that other threads can then gain access.
一旦该线程完成对该对象的处理之后,便释放该对象,以便其他线程可以进行访问。
If you are going to hold the lock on the collection during an entire iteration, then other threads may be stalled waiting for the collection lock for a long time.
如果您要在整个迭代期间都保持对集合的锁,那么其他的线程就会在锁外停留很长的一段时间,等待解锁。
Even worse, I don't think that the query re-allocates those threads for other queries until the whole query finishes.
更糟糕的是,除非是整个查询都完成了,否则这些线程都无法被分配给其他查询任务。
The longer a synchronized code block requires for execution, the longer other threads wait to enter that block.
同步代码块所需的执行时间越长,其他线程等待进入该代码块的时间就越长。
This will block the thread until all other threads have called the method, then they are released all at once.
这么做会引起阻塞,当所有线程都调用了这个方法后,便会同时释放所有线程。
When the system is overloaded, on the other hand, threads need to wait for other threads as well as for the garbage collector, and the maximum response times increase sharply for both policies.
另一方面,当系统超载时,线程需要等待其他线程,就像等待垃圾收集一样,并且两种策略的最大响应时间都会急剧增加。
The problem is that the two threads interfered with each other, causing a wrong final answer.
问题在于,两个线程互相干扰,从而导致产生错误的最终答案。
Most programs create many temporary objects that are used within the context of a single thread but never escape to the visibility of other threads.
大多数程序所创建的临时对象都用在单独的线程上下文中,很少被其他线程所用。
The GC suspends all other managed threads, clears up some memory, resumes the work of the suspended managed threads and returns the control to the original thread.
GC首先会挂起所有其他的托管线程,然后清理内存,最后再恢复被挂起的托管线程,并交出控制权。
The cost is that the duration for which the lock is held may be lengthened, increasing the amount of time other threads might be locked out and also increasing the probability of lock contention.
代价则是持有锁的时间可能会变长,从而延长了其他线程被锁在外面的时间,也会增大锁争用的可能性。
There's the race condition caused by other threads banging on your collection while the add or remove is taking place.
当添加或移除元素时,存取集合的其他线程会引起竞争条件。
But once the previous lock is released, other threads are now free to modify the previous bucket.
然而前面的锁一旦被释放,其它的线程就将可以自由修改前面的bucket。
The is_dumping global variable is used to stop other threads from changing the contents of the buffer once a signal has been received to dump data.
一旦接收到了转储数据的信号,将使用 is_dumping全局变量禁止其他的线程更改该缓冲区的内容。
Android offers several ways to access the UI thread from other threads. You may already be familiar with some of them but here is a comprehensive list.
Android提供了几种不同的方式来通过其它线程访问UI线程。
By committing the data to the BackingMap, the application makes the data accessible to other applications (or other application threads, if the application is running in a concurrent environment).
通过将数据提交到BackingMap,应用程序可将数据提供给其他应用程序(或者,如果应用程序在并发环境中运行,则为其他应用程序线程)访问。
By committing the data to the BackingMap, the application makes the data accessible to other applications (or other application threads, if the application is running in a concurrent environment).
通过将数据提交到BackingMap,应用程序可将数据提供给其他应用程序(或者,如果应用程序在并发环境中运行,则为其他应用程序线程)访问。
应用推荐