Skip to content

IThreadBridge

interface IThreadBridge
Extends: IBridge
Known subtypes: DirectThreadBridge, FrameThreadBridge
Package: dev.joid.lib.bridge.thread · Module: core · Source: IThreadBridge.java

The bridge that tells JOID which thread draws and runs the work of other threads on it.

Every entry point of JOID that must run on the render thread goes through ThreadUtils.runOnRenderThread, which calls this bridge. Write your own when the engine owns the render thread hands the work to the queue of an engine that draws on a thread of its own.

ReturnsSignatureSummary
booleanisRenderThread() abstractIf true, the calling thread is the thread that draws JOID; it answers without locking.
voidexecute(Runnable runnable) abstractRuns the task on the render thread, before the next frame, in the order of the calls; never on another thread.

boolean isRenderThread() abstract

If true, the calling thread is the thread that draws JOID; it answers without locking.

void execute(Runnable runnable) abstract

Runs the task on the render thread, before the next frame, in the order of the calls; never on another thread.


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