Mercurial > hg > Database > Alice
changeset 654:2fbd6ac705df
fix
author | suruga |
---|---|
date | Fri, 09 Feb 2018 19:48:43 +0900 |
parents | fffcbd3a3dc7 |
children | 1c93e82e05c6 |
files | src/main/java/alice/test/codesegment/remote/RemoteIncrement1.java src/main/java/alice/test/concurrent/SleepCodeSegment.java |
diffstat | 2 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/alice/test/codesegment/remote/RemoteIncrement1.java Wed Feb 07 19:14:30 2018 +0900 +++ b/src/main/java/alice/test/codesegment/remote/RemoteIncrement1.java Fri Feb 09 19:48:43 2018 +0900 @@ -23,7 +23,11 @@ int num = this.num.asInteger(); System.out.println("remote " + num++); - if (num == 5) return ; + if (num == 5) { + ods.finish("remote"); + ods.finish("local"); + return; + } if ( nullValue.getVal() == null ) { System.out.println("get remote null value"); }
--- a/src/main/java/alice/test/concurrent/SleepCodeSegment.java Wed Feb 07 19:14:30 2018 +0900 +++ b/src/main/java/alice/test/concurrent/SleepCodeSegment.java Fri Feb 09 19:48:43 2018 +0900 @@ -1,5 +1,6 @@ package alice.test.concurrent; +import org.msgpack.type.Value; import org.msgpack.type.ValueFactory; import alice.codesegment.CodeSegment; @@ -24,6 +25,13 @@ e.printStackTrace(); } System.out.println("[CodeSegment-" + num + "] Hello, World!"); + try { + Value i = ds1.getVal(); + if (i == null) + System.out.println("got null"); + } catch (Exception e) { + System.out.println("got Exception : "+e); + } ods.put("local", "finish", ValueFactory.createNilValue()); }