$.sys.sleep(100);
return x + x;
}
};
CoreObject<String> result = c.async(f).await();
Assert.assertEquals("aabbccddee", result.string().join());
CoreObject<String> result2 = c.async(f, KillSwitch.TIMED(150)).await();
Assert.assertTrue(result2.contains("aa"));
Assert.assertFalse(result2.contains("cc"));