Skip to content

FrameThreadBridge

final class FrameThreadBridge
Implements: IThreadBridge
Package: dev.joid.lib.bridge.thread · Module: core · Source: FrameThreadBridge.java

The default thread bridge of a backend, for which the thread that creates it draws while other threads queue their tasks.

Backend.register creates it on the thread that registers the backend. UIBridgeRegistry.frame calls runTasks() at the start of every frame.

ReturnsSignatureSummary
FrameThreadBridge()Creates the bridge and makes the calling thread the render thread.

ReturnsSignatureSummary
booleanisRenderThread()If true, the calling thread is the thread that created the bridge.
voidexecute(Runnable runnable)Runs the task at once on the render thread; from another thread, queues it for the next runTasks().
voidrunTasks()Runs the queued tasks in order, including the tasks queued while it runs.

FrameThreadBridge()

Creates the bridge and makes the calling thread the render thread.

boolean isRenderThread()

If true, the calling thread is the thread that created the bridge.

void execute(Runnable runnable)

Runs the task at once on the render thread; from another thread, queues it for the next runTasks().

void runTasks()

Runs the queued tasks in order, including the tasks queued while it runs. Called from another thread than the one that created the bridge, it warns once. A task that throws a RuntimeException prints one warning per kind of failure, and the next tasks still run.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page