MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / rejoin

Method rejoin

src/main/java/field/app/ThreadSync.java:171–187  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

169 }
170
171 static public Object rejoin() throws InterruptedException, Stop {
172 if (fiber.get() == null)
173 throw new IllegalArgumentException(" yield called from non-fiber thread");
174
175 fiber.get().debugStatus = "rejoined from " + Arrays.asList(new Exception().getStackTrace());
176
177 if (fiber.get().stopped) throw new Stop();
178
179 List<Object> c = new ArrayList<Object>();
180 fiber.get().input.drainTo(c);
181
182 Object t = fiber.get().input.take();
183
184 if (fiber.get().stopped) throw new Stop();
185
186 return c;
187 }
188
189 static public Object wait(int n) throws InterruptedException, Stop {
190 Object q = null;

Callers 1

gFunction · 0.80

Calls 3

asListMethod · 0.80
takeMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected