sclass PingSource { // returns true if it slept settable volatile IF0 action; // returns true if it slept final bool get() { var a = action; ret a != null && a!; } void cancel { action = () > throw new ThreadCancelledException; } }