异步请求是在另一个线程上处理的。
这阻塞了主线程但是在另一个线程上执行代码。
This blocks the main thread but executes the code on another thread.
而另一个线程可随处运行,这会导致性能降低。
The other just goes wherever it wants, and that leads to poorer performance.
在队列中加入一个元素的生产者会等待另一个线程的消费者。
The producer adding an element to the queue will wait for a consumer in another thread.
结果,每一个线程都会等待另一个线程所保持的锁。
As a result, each thread ends up waiting for a lock held by the other thread.
当一个线程向另一个线程请求信息时,就可能引起线程切换。
One thread asking another for information can cause a thread switch, or one thread preempting another can cause a thread switch.
在这种情况下,低优先级线程和另一个线程都会被提高优先级。
In this case, the low-priority thread and that other thread are boosted.
当一个锁当前正在使用,而另一个线程试图获取它,那么就会出现锁争用。
Lock contention occurs when a lock is currently in use and another thread tries to acquire it.
问题是,同一时间内,另一个线程对同一数据结构进行了另一个修改。
The problem is that we have another thread performing the other modifications to the same data structure effectively at the same time.
这可能导致通过一系列加载和存储将对象从一个线程移动到另一个线程。
This could result in objects being moved from one thread to another through a series of loads and stores.
当Work对象发送到另一个线程时将调用run()方法。
The run() method is called when the Work object is dispatched to another thread.
慢锁由另一个线程持有,在可以被请求之前必须被那另一个线程释放掉。
A slow lock is owned by another thread and must be relinquished by that other thread before it can be acquired.
如果一个锁正在使用中,而另一个线程尝试获取它,这时会发生锁争用。
Lock contention occurs when a lock is currently in use and another thread attempts to acquire it by another thread.
如果另一个线程在尝试获取锁,那么循环线程只需要释放契约就可以了。
The thread will only release the lease if another thread attempts to acquire the lock.
一个线程称为setter方法,另一个线程称为retrieval方法。
One thread calls the setter method and the other thread calls the retrieval method.
如果CAS失败,意味着另一个线程已经修改了堆栈,那么过程就会重新开始。
If the CAS fails, it means that another thread has modified the stack, so the process starts again.
一支单独的箭头指出一个线程竞争:一个线程正在等候另一个线程释放一个锁。
A single arrow indicates a thread contention: One thread is waiting for another thread to release a lock.
当一个线程中断另一个线程时,被中断的线程不一定要立即停止正在做的事情。
When one thread interrupts another, the interrupted thread does not necessarily stop what it is doing immediately.
因为一个线程不停地“取消”了另一个线程执行的加一操作,所以产生这个问题。
The problem occurred because one thread repeatedly "cancelled out" the increment performed by the other thread. Let's take a look at some corrected code that USES a mutex to solve the problem.
在获取这个序列号和使用它获取薪水之间,另一个线程可能从两个表删除员工信息。
Between obtaining the serial number and using it to obtain the salary, another thread could remove the employee from both tables.
相反,中断是礼貌地请求另一个线程在它愿意并且方便的时候停止它正在做的事情。
Instead, interruption is a way of politely asking another thread to stop what it is doing if it wants to, at its convenience.
接下来,对于另一个线程池类DatamineThread,几乎复制了完全相同的结构。
Next, you almost copy the exact same structure for the next thread pool class, DatamineThread.
在这个被称为“并行管道”的模型下,主线程将会在另一个线程产出结果的同时进行循环处理。
In this model, called Pipelining, the main thread is used to loop through the results as they are produced by the other threads.
通过这种方法,使用者可以使用一个线程来发送请求,而使用另一个线程来接收响应。
With this approach, the consumer USES one thread to send the request and another to receive the response.
如果一个线程尝试读取某个文件,而另一个线程对其进行写访问,则可能会损坏数据。
If one thread attempts to read from a file whilst another is writing to it, the data may become corrupted.
当线程的任务队列为空,它将尝试从另一个线程的deque的尾部窃取另一个任务。
In the event the thread's task queue is empty, it then tries to steal another task off the tail of another thread's deque.
一个线程使用另一个线程中的JNIEnv会导致一些小bug和难以调试的崩溃问题。
Use of the JNIEnv from one thread by another thread can lead to subtle bugs and crashes that are hard to debug.
如果一个安全程序的线程没有预防这些中断,那么另一个线程就可以干扰该安全程序的线程。
If a secure program's thread is not prepared for these interruptions, another thread may be able to interfere with the secure program's thread.
如果库需要把它们挪到另一个线程,会通过封送回调的字段传递它们,然后通过一个泛型异常包装它们。
Libraries that needed to move them to another thread passed them as a field to a marshaled callback where they were then wrapped with a generic exception.
一个线程占用一个给定锁的时间越短,另一个线程在该线程仍占用锁时请求该锁的可能性就越小。
The shorter the time a thread holds a given lock, the lower the probability that another thread will request it while the first thread is holding it.
应用推荐