Epok Engine

PSYQO SDK

psyqo::Kernel::queueCallback

Function · 1 overload

Function

Queues a callback to be called from the main thead.

Belongs to
psyqo::Kernel
Header
kernel.hh
Overloads
1

Declaration

Declaration
void queueCallback(eastl::function<void()>&& lambda)

Queues a callback to be called from the main thead.

ParameterTypeMeaning
lambdaeastl::function<void ()> &&Value supplied for lambda. Keep referenced or pointed-to data valid for the complete call.

Returns: Nothing (void).

Example

C++ example
#include "psyqo/kernel.hh"

// Assume these named values have been initialized with valid data:
// eastl::function<void ()> && lambda

psyqo::Kernel::queueCallback(lambda);

Why use it

The asynchronous shape lets the frame loop continue while hardware or queued work completes.

Trade-offs and warnings

Captured data and buffers must remain valid until the callback or task has completed. Pointer/reference arguments are borrowed unless the source contract says otherwise; keep them valid for the complete operation and never assume null is accepted.

Declared in https://github.com/pcsx-redux/nugget/blob/6186b131aacc5853a9161fb076ed34ffe504552d/psyqo/kernel.hh:303

Related members