(int n)
| 187 | } |
| 188 | |
| 189 | static public Object wait(int n) throws InterruptedException, Stop { |
| 190 | Object q = null; |
| 191 | for (int i = 0; i < n; i++) { |
| 192 | q = ThreadSync.yield(null); |
| 193 | } |
| 194 | return q; |
| 195 | } |
| 196 | |
| 197 | static public Object pause(Supplier<Object> during) throws InterruptedException, Stop { |
| 198 | if (fiber.get() == null) throw new IllegalArgumentException(" pause called from non-fiber thread"); |
no test coverage detected