mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 03:15:35 -04:00
fix gui freeze if poll is busy
It actually should crash and not freeze :)
This commit is contained in:
parent
07532707bc
commit
84c47c45a2
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Minosoft
|
* Minosoft
|
||||||
* Copyright (C) 2020-2022 Moritz Zwerger
|
* Copyright (C) 2020-2023 Moritz Zwerger
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
@ -31,7 +31,7 @@ object RenderUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun RenderContext.runAsync(runnable: () -> Unit) {
|
fun RenderContext.runAsync(runnable: () -> Unit) {
|
||||||
DefaultThreadPool += ThreadPoolRunnable(ThreadPool.HIGHER) {
|
DefaultThreadPool += ThreadPoolRunnable(ThreadPool.HIGHER, forcePool = false) {
|
||||||
try {
|
try {
|
||||||
runnable()
|
runnable()
|
||||||
} catch (error: Throwable) {
|
} catch (error: Throwable) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user