M: no, I can wait for the ten days.Will you notify me when you receive the proceeds?
村田:不用了,我可以等10天。你们收到款子后,可以通知吗?
Similarly, when a notify() is done, the thread from the front of the highest-priority queue of waiters is unblocked from its wait.
类似地,完成notify() 以后,等待者的最高优先级队列前端的线程从等待中解除阻塞。
What we usually want is a work queue combined with a fixed group of worker threads, which USES wait and notify to signal waiting threads that new work has arrived.
我们通常想要的是同一组固定的工作线程相结合的工作队列,它使用wait和notify来通知等待线程新的工作已经到达了。
Threads doing wait and notify must currently have locked the object.
执行wait和notify的线程当前必须已经锁定对象。
There is an interaction between notification and locking — to wait or notify on an object, you must hold the lock for that object.
通知与锁定之间有一个交互——为了在对象上wait或notify,您必须持有该对象的锁。
Thrown to indicate that a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor.
一个线程没有获得特定的监控器,而试图等待一个对象的监控器或通知其他线程等待一个对象的监控器时抛出。
The root Object class includes some special methods for communicating across threads -- wait(), notify(), and notifyAll().
根类 Object包含某些特殊的方法,用来在线程的wait() 、notify()和notifyAll() 之间进行通信。
You can think of them of as the Continuations equivalent of the standard Object wait()/notify() mechanism.
可以将它们视为标准的Objectwait()/notify()机制的Continuations等价体。
Wait until they notify you that you must appear; why invite trouble? Better let sleeping dogs lie.
等他们通知你必须露面时再说,何必自找麻烦呢?最好还是随他去。
Oh, please don't bother; I can wait for the ten days. Will you notify me when you receive the proceeds?
不用了,我可以等十天。你们收到款子后,可以通知我吗?
Wait until they notify you that you must appear; why invite trouble?
等他们通知你必须露面时再说,何必自找麻烦呢?
Why isn't calling wait(), notify() or notifyAll() without a synchronized block not a compiler error?
为什么不打电话给wait(),没有一个同步块不是一个编译错误notify()或notifyall()?
Why isn't calling wait(), notify() or notifyAll() without a synchronized block not a compiler error?
为什么不打电话给wait(),没有一个同步块不是一个编译错误notify()或notifyall()?
应用推荐