不能,wait后你得给它signal才能再执行吧

解决方案 »

  1.   

    这个是MFC的东西吗?二Object.wait
    Class Overview | Class Members | This Package | All Packages Syntax 1
    public final native void wait( long timeout ) throws InterruptedException 
    Parameters
    timeout 
    the maximum time to wait in milliseconds. 
    Description
    Waits to be notified by another thread of a change in this object. 
    The current thread must own this object's monitor. The thread releases ownership of this monitor and waits until either of the following two conditions has occurred: Another thread notifies threads waiting on this object's monitor to wake up either through a call to the notify method or the notifyAll method. 
    The timeout period, specified by the timeout argument in milliseconds, has elapsed. 
    The thread then waits until it can re-obtain ownership of the monitor and resumes execution. This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor. 
    Exceptions
    IllegalArgumentException if the value of timeout is negative. 
    Exceptions
    IllegalMonitorStateException if the current thread is not the owner of the object's monitor. 
    Exceptions
    InterruptedException if another thread has interrupted this thread. 
    See Also
    notify, notifyAll