mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
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.
This commit is contained in:
parent
a94686ddf6
commit
929e77bf69
|
@ -344,9 +344,11 @@ public class TObject {
|
|||
|
||||
@Override
|
||||
public void onTimer() {
|
||||
if (!expired()) {
|
||||
run();
|
||||
}
|
||||
Platform.postpone(() -> {
|
||||
if (!expired()) {
|
||||
run();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user