当一个线程在运行的时候,不管是上传还是下载,你可以查询进程状态并且给用户一个反馈(例如一个进度条)。
While a thread is running, either uploading or downloading, you can query it to check on its status to provide the user with feedback (e.g. a progress bar).
异步请求是在另一个线程上处理的。
一个线程被分配为处理关机事件。
一个线程会检查数据区,检查数据的到达。
A thread polls the data area and checks for the data's arrival.
使用单独一个线程池可能会导致严重的锁争用。
Having a single thread pool could cause significant lock contention.
如果锁刚好只被一个线程访问,则可以使用偏向锁。
If the lock happens to be accessed by only one thread, biased locking can be applied.
结果,每一个线程都会等待另一个线程所保持的锁。
As a result, each thread ends up waiting for a lock held by the other thread.
因此实现典型的每个连接一个线程的模型便非常简单。
Thus it is relatively straightforward to implement the classic one thread per connection model.
这阻塞了主线程但是在另一个线程上执行代码。
This blocks the main thread but executes the code on another thread.
如果暂挂一个线程,则其堆栈帧显示为子元素。
If the thread is suspended, its stack frames are shown as child elements.
而另一个线程可随处运行,这会导致性能降低。
The other just goes wherever it wants, and that leads to poorer performance.
然而,该测试程序只包含一个线程,因而显然不存在竞争。
However, the test program contains only a single thread, and therefore is guaranteed never to experience contention.
MyObservable启动一个线程,读取系统时钟。
所有基准测试都只使用一个线程;同步的类不涉及线程争用。
Only a single thread is used for all these benchmarks; the synchronized classes are under no thread contention.
轮询线程会一直等待第一个线程给它发送一个信号。
The polling thread waits for the signal from the first thread.
如果控制的线程是流程,则只允许流程的一个线程参与事务。
If the thread of control is a process, only one thread from a process is allowed to participate in the transaction.
这样将给您带来50个文件,每个文件仅包含一个线程的跟踪数据。
This leaves you with 50 files, each containing the trace for just one thread.
您可以创建一个线程,用于在指定的时间间隔或时期内运行某种逻辑。
You can create a thread to run certain logic at specified time intervals or periods.
然而,即使执行单元是一个线程,期望的事务管理器行为都是相同的。
However, the desired behavior of the transaction manager would be the same even if the unit of execution was a thread.
当一个线程向另一个线程请求信息时,就可能引起线程切换。
One thread asking another for information can cause a thread switch, or one thread preempting another can cause a thread switch.
一个线程可以同时持有多个锁,并且可能已经按某种顺序获得了这些锁。
A thread can simultaneously hold more than one lock, and these locks might have been acquired in a certain order.
标准的SOAP引擎通常只是在同一个线程中接受请求并做出响应。
Standard SOAP engines typically receive a request and respond to it all on the same thread.
一个线程称为setter方法,另一个线程称为retrieval方法。
One thread calls the setter method and the other thread calls the retrieval method.
当一个线程中断另一个线程时,被中断的线程不一定要立即停止正在做的事情。
When one thread interrupts another, the interrupted thread does not necessarily stop what it is doing immediately.
这可能导致通过一系列加载和存储将对象从一个线程移动到另一个线程。
This could result in objects being moved from one thread to another through a series of loads and stores.
慢锁由另一个线程持有,在可以被请求之前必须被那另一个线程释放掉。
A slow lock is owned by another thread and must be relinquished by that other thread before it can be acquired.
因为一个线程不停地“取消”了另一个线程执行的加一操作,所以产生这个问题。
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.
常常出现大多数线程已经完成卸载过程,只有一个线程仍然在运行的情况。
It may so happen that all the threads have finished the unload process but one is still running.
这里设置调度程序的方法将导致在其中一个线程停止时整个调度程序停止。
The way the scheduler is set up here causes the whole scheduler to stop when one thread does so.
这里设置调度程序的方法将导致在其中一个线程停止时整个调度程序停止。
The way the scheduler is set up here causes the whole scheduler to stop when one thread does so.
应用推荐