comparison src/main/java/alice/test/concurrent/SleepCodeSegment.java @ 654:2fbd6ac705df

fix
author suruga
date Fri, 09 Feb 2018 19:48:43 +0900
parents aefbe41fcf12
children
comparison
equal deleted inserted replaced
653:fffcbd3a3dc7 654:2fbd6ac705df
1 package alice.test.concurrent; 1 package alice.test.concurrent;
2 2
3 import org.msgpack.type.Value;
3 import org.msgpack.type.ValueFactory; 4 import org.msgpack.type.ValueFactory;
4 5
5 import alice.codesegment.CodeSegment; 6 import alice.codesegment.CodeSegment;
6 import alice.datasegment.CommandType; 7 import alice.datasegment.CommandType;
7 import alice.datasegment.Receiver; 8 import alice.datasegment.Receiver;
22 Thread.sleep(1000); 23 Thread.sleep(1000);
23 } catch (InterruptedException e) { 24 } catch (InterruptedException e) {
24 e.printStackTrace(); 25 e.printStackTrace();
25 } 26 }
26 System.out.println("[CodeSegment-" + num + "] Hello, World!"); 27 System.out.println("[CodeSegment-" + num + "] Hello, World!");
28 try {
29 Value i = ds1.getVal();
30 if (i == null)
31 System.out.println("got null");
32 } catch (Exception e) {
33 System.out.println("got Exception : "+e);
34 }
27 35
28 ods.put("local", "finish", ValueFactory.createNilValue()); 36 ods.put("local", "finish", ValueFactory.createNilValue());
29 } 37 }
30 38
31 } 39 }