Postpone execution code after `wait` method, since it's executed in a native callback which can't be async. When the code contains async calls, compiler produces error.
@@ -344,9 +344,11 @@ public class TObject {
@Override
public void onTimer() {
+ Platform.postpone(() -> {
if (!expired()) {
run();
}
+ });
}
@Override
