The most significant difference in the two threads is the inspection required.
最大的不同是这两种螺纹的检查要求。
The physical processor takes care of synchronization issues between the two threads.
物理处理器将负责处理这两个线程之间的同步问题。
The problem is that the two threads interfered with each other, causing a wrong final answer.
问题在于,两个线程互相干扰,从而导致产生错误的最终答案。
If the two threads appear, the expression was not evaluated because of a potential cross-thread dependency.
如果显示两条线,则是由于潜在的跨线程依赖项而未计算表达式。
The result is a race condition: it's a race between the two threads, and the outcome will be different based on who runs first.
它的结果是个竞争条件:这是两个线程之间的竞争,结果也会因谁先运行而不同。
The two threads running in parallel modify the elements num_proc1 and num_proc2 respectively, which are on different cache lines.
这两个并行运行的线程分别修改位于不同高速缓存线路上元素num_proc1和num_proc2。
However, having said all that, the same basic problem remains: Programmers still have to worry way too much about the issues of signaling and coordinating the two threads.
但是,已经说过,仍然存在相同的基本问题:程序员仍然需要过分担心两个线程之间的通信和协调问题。
I can't do anything before any of the two threads are running, as I don't have control over the spawning process (c code is compiled and executed in a script like fashion).
我不能在任何两个线程正在运行,做任何事情,因为我没有在产卵过程控制(C代码被编译和执行脚本的方式)。
Two resources are potentially affected by the possibility of allowing additional threads per request.
允许每个请求上有额外线程的可能性,可能会影响两个资源。
The POWER6 chip has two hardware instruction threads that are both capable of issuing multiple instructions per cycle, which causes a boost in performance.
POWER 6处理器有两个能够在每个处理器周期发出多条指令的硬件指令线程,从而改善了性能。
There are two threads: one assumes that in every time unit, a zombie eats the brains of a human, converting that number to zombies.
有两个线程:其中一个线程假设每隔一定时间,一个僵尸进程就会吃人脑,将该数字转化为僵尸。
The POWER5 chip has two hardware instruction threads that are both capable of issuing multiple instructions per cycle, which causes a boost in performance.
POWER 5芯片有两个硬件指令线程,在每个周期都能够执行多个指令,这可以提高性能。
Also, if the process or task instances are deleted by two threads simultaneously, this results in error messages in the logs.
另外,如果两个线程同时删除过程或任务实例,会导致在日志中记录错误消息。
In the absence of synchronization, it is allowable (according to the JMM) for two threads to see different values in the same memory location.
在缺少同步的情况下,J MM会允许两个线程在同一个内存地址上看到不同的值。
Figure 1 shows the interactions of two threads around a pipe.
图1展示了两个线程围绕管道进行交互。
When two threads contend for a lock, one of them will get the lock and the other will have to block until the lock is available.
当两个线程竞争同一个锁时,其中一个会得到锁,另一个不得不阻塞,直到锁可用。
Tuning the size of a thread pool is largely a matter of avoiding two mistakes: having too few threads or too many threads.
调整线程池的大小基本上就是避免两类错误:线程太少或线程太多。
Ideally no two threads can try to modify the same piece of data at the same time, dirty reads are not possible, and deadlocks are automatically detected and handled.
理想情况下,多个线程不能同时访问同一块数据,脏读将不复存在,死锁则会被自动监测和处理。
Two objects are created, StringCreator and StringReader, on two separate threads at lines //5 and //6, passing a reference to the MutableString object.
在行 //5和 //6 处,在两个分开的线程上创建了两个对象StringCreator 和StringReader。 传入一个MutableString对象的引用。
A little digging with "top -H" and gdb seems to indicate that the two busiest threads in the receiver are both in packetprocessor_tcp.
对top -H和gdb 的深入了解表明,这两个接收方最忙的线程都位于 packetprocessor_tcp 中。
If calls to rand from two threads overlap, it is possible for the wrong Numbers to be returned.
如果在两个线程交叠时调用rand,它就可能返回一个错误的随机数。
There are two busy threads on the sending side, and only one of them gets its affinity set.
在发送端有两个繁忙的线程,并且其中仅有一个拥有其亲和力集合。
In essence, two hardware threads can actually run on one physical processor at the same time.
从本质上讲,两个硬件线程实际上可以同时在一个物理处理器中运行。
Otherwise, if two threads tried to execute the increment simultaneously, an unlucky interleaving of operations would result in the counter being incremented only once, instead of twice.
否则,如果两个线程试图同时执行增加,操作的不幸交叉将导致计数器只被实现了一次,而不是被实现两次。
The number of active threads pushing work into the application is increased every two minutes.
将工作推入应用程序的活动线程数量每隔两分钟增加一次。
On the other hand, two threads should never act on the same job, to avoid data inconsistencies.
另一方面,为了避免数据的不一致,两个不同的线程决不能处理同一个任务。
No two threads will be able to execute methods against those objects at the same time (on a per-object basis, obviously).
不会存在两个线程同时调用该对象的方法的情况(显然是以对象为基础的)。
You will need two kernel threads for the implementation of this strategy.
要实现这种策略,我们需要两个内核线程。
But after creating the second thread, the primordial thread is preempted and is never allowed to tell the threads to terminate because the two RT threads execute on the two processors and never block.
但是创建第二个线程后,原始线程被抢占并且再也不允许告知线程结束,因为两个RT线程在两个处理器上执行而且永远不会阻塞。
But after creating the second thread, the primordial thread is preempted and is never allowed to tell the threads to terminate because the two RT threads execute on the two processors and never block.
但是创建第二个线程后,原始线程被抢占并且再也不允许告知线程结束,因为两个RT线程在两个处理器上执行而且永远不会阻塞。
应用推荐