1 23 24 package protoactive.core.body.future; 25 26 29 30 public class LocalFuture { 31 32 protected Object reply; 33 34 protected synchronized void waitReply () { 35 while (reply == null) { 36 try { 37 wait(); 38 } catch (InterruptedException e) { 39 } 40 } 41 } 42 43 public synchronized void receiveReply (Object reply) { 44 this.reply = reply; 45 notifyAll(); 46 } 47 } 48 | Popular Tags |