Mercurial > hg > Database > Alice
view src/test/java/alice/daemon/ReceiveInteger.java @ 655:1c93e82e05c6 default tip
fix timestamp
author | suruga |
---|---|
date | Sat, 17 Feb 2018 00:33:00 +0900 |
parents | b7d02ea79850 |
children | 15eeb439830c |
line wrap: on
line source
package alice.daemon; import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; public class ReceiveInteger extends CodeSegment{ public Receiver num = ids.create(CommandType.TAKE); @Override public void run() { int num = this.num.asInteger(); System.out.println("[CodeSegment] "+num); if (num==10) { ods.put("multicast1", "str", "finish"); try { synchronized (this) { wait(2000); } } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } System.exit(0); } ReceiveInteger cs = new ReceiveInteger(); cs.num.setKey("num"); } }