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.
Description
Section titled “Description”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.
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
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. |
Method details
Section titled “Method details”isRenderThread
Section titled “isRenderThread”boolean isRenderThread() abstract
If true, the calling thread is the thread that draws JOID; it answers without locking.
execute
Section titled “execute”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
