Skip to content

ThreadingImpl

object ThreadingImpl

Shared client gametest threading bridge inspired by Fabric's ThreadingImpl.

Uses a Phaser for tick-phase barriers and semaphores for task handoff from the gametest thread to client/server threads.

Properties

testFailureException

Functions

awaitTicks

@JvmStatic
fun awaitTicks(ticks: Int, timeoutMillis: Long): Boolean

checkOnGametestThread

isOnGametestThread

onClientRunStart

onClientRunStop

onClientTick

onServerRunStart

onServerRunStop

onServerTick

postRunTasks

preRunTasks

runOnClient

@JvmStatic
fun runOnClient(action: () -> Unit)

runOnServer

@JvmStatic
fun runOnServer(action: () -> Unit)

runTestThread

@JvmStatic
fun runTestThread(testRunner: () -> Unit)

setGameCrashed