master worm with two threads 双头测量蜗杆
If you launch a single block with two threads, you still launch 1 warp, but now the single warp contains 2 active threads.
如果您启动一个与两个线程块,你还推出1扭曲,但现在单一经包含2个活动线程。
Looking at this output, you can see that you received a Hello World statement from two threads with date stamps.
仔细观察输出结果,您可以看到从两个线程都输出了Hello world语句,并都带有日期戳。
Further, because the score-updating logic follows the check-then-act pattern, it is possible for two threads to "race" to update the high score, with unpredictable results.
另外,由于分数更新逻辑遵循check - then - act模式,因此可能出现两个线程“争夺”更新最高分,从而导致难以预料的结果。
And so now, you have two threads so to speak, two miniature programs, two sprites all interacting with one another.
现在我们有两个线程,两个轻量型程序,两个精灵在沟通。
应用推荐