View Single Post
  #5 (permalink)  
Old 08-29-2008, 01:05 PM
ProjectKaiser's Avatar
ProjectKaiser ProjectKaiser is offline
Member
 
Join Date: Aug 2008
Location: Saint-Petersburg, Russia
Posts: 66
Rep Power: 0
ProjectKaiser is on a distinguished road
Default
Code:
        Boolean midipedalflag;

            midipedalflag=false;  // the flag set by midipedal
            do {                 // and space bar
                synchronized(midipedalflag){
                    midipedalflag.wait();                
                }
            } while (!midipedalflag);
            midipedalflag=false;
Multipedal should do:
Code:
midipedalflag.notify();
Note:
1) To be notifiable midipedalflag is Boolean, not boolean
2) Seems you can miss some events. E.g. midipedal sets midipedalflag = true before you set it to false by line
Code:
            midipedalflag=false;  // the flag set by midipedal
Reply With Quote