If multiple threads access a set concurrently, and at least one of the threads modifies the set, it must be synchronized externally.
这个方法只能由一个线程是此对象监视器的所有者被调用。
This method should only be called by a thread that is the owner of this object's monitor.
Join()方法允许一个线程等待另一个线程的完成。
The join() method allows one thread to wait for the completion of the other.
线程是进程的一段特殊的执行过程,当一个线程修改了进程的资源,它的相邻线程可以立刻得到改变。
A thread is a particular execution path of a process; when one thread modifies a process resource, the change is immediately visible to sibling threads..
如果没有同步,一个线程的变化就不能被其他线程看到。
Without synchronization, one thread's changes might not be visible to other threads.
在同时多线程中,多于一个线程的指令可以在任何指定的流水线阶段中同时执行。
In simultaneous multithreading, instructions from more than one thread can be executed in any given pipeline stage at a time.
比如一个线程当前在一个同步块或同步方法中,其它线程不能进入该块或方法中。
If the thread is currently in a synchronized block or method no other thread can enter this block or method.
我们将前一半(这里是第一行)分配给一个线程,后一半(第二行)分配给另一个线程:.
We will assign first half(in this case the first row) to one thread, and the second half(second row) to another thread:.
这个能力意味着一个线程本质上可以在任何其他线程上执行一个方法。
This capability means that one thread can essentially execute a method on any other thread..
Join()方法可以让一个线程等待另一个线程执行完成。
The join() method allows a ForkJoinTask to wait for the completion of another one.
这是因为一个线程可以处理多个连接,而不是每个连接需要一个进程为其提供服务。
This is because one thread can handle more than one connection, instead of requiring a new process for each connection.
而在AWT中,原生AWT运行于一个线程而Java层次运行于另一个线程。
In AWT, the native half of AWT runs on one thread and the Java level runs on another thread..
需要注意的是,如果你想等待一个线程结束,那么需要调用join()方法。
Note that if you would like to wait for a thread to terminate, you would need to call its join() method.
如果一个线程更改了静态变量的值,则该静态变量可能会破坏其他线程的功能。
If one thread change value of a static variable that can possibly break functionality of other threads..
你只要创建一个线程,然后让它等待着,因为在等待时并不会占用任何资源。
You just create a thread and let the thread wait because it's not consuming any resources when it's waiting.
如果一个线程想要访问一个共享资源,这个线程必须在被授予对该资源的访问权之前获取一个锁。
If a thread wants to access a shared resource, this thread must grab a lock before it's granted access to that resource.
如果一个线程拥有一些数据的锁,那么没有其他线程可以获取这个锁,直到拥有锁的线程释放它。
If one thread owns a lock on some data, then no others can obtain that lock until the thread that owns the lock releases it.
English
Bahasa indonesia
日本語
عربى
Български
বাংলা
Český
Dansk
Deutsch
Ελληνικά
Español
Suomi
Français
עִברִית
हिंदी
Hrvatski
Magyar
Italiano
Қазақ
한국어
മലയാളം
मराठी
Bahasa malay
Nederlands
Norsk
Polski
Português
Română
Русский
Slovenský
Slovenski
Српски
Svenska
தமிழ்
తెలుగు
ไทย
Tagalog
Turkce
Українська
اردو
Tiếng việt