fix gui freeze if poll is busy

It actually should crash and not freeze :)
This commit is contained in:
Bixilon 2023-02-01 21:34:15 +01:00
parent 07532707bc
commit 84c47c45a2
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -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) {