Skip to main content
Class: SummerOperation ยท Inherits: RefCounted Single-terminal asynchronous operation for the Summer runtime. Completes exactly once on the main thread with a SummerResult. Deferred operations are owned by a revocable Summer queue until terminal queue cleanup, including cancellation, so dropping the caller reference cannot strand a queued completion. Use get_result_or_completed_signal() when awaiting from GDScript so a synchronously published scheduling failure cannot be missed. Scene module teardown revokes queued dispatch and publishes cancellation without invoking script callbacks. Scripts may observe or cancel an engine-created operation but cannot construct or complete one.

Properties

Methods

cancel

Requests cancellation on the main thread. Returns true only when cancellation wins while pending. The terminal result then has code &"cancelled". Returns: bool

get_result_or_completed_signal

Returns the terminal SummerResult when already complete, or the completed signal while pending. On the main thread, var result: SummerResult = await operation.get_result_or_completed_signal() is race-free even when deferred scheduling fails synchronously before the operation is returned. Do not await completed directly unless the pending state was established without a gap. Returns: Variant

is_cancelled

Returns whether cancellation won and the operation reached STATE_CANCELLED. Returns: bool

is_completed

Returns whether the operation completed normally, including a structured failure result. Returns: bool

is_pending

Returns whether no terminal result has been published. Returns: bool

Signals

completed

Emitted once after internal runtime state bookkeeping for observable terminal transitions, so continuations observe terminal singleton state. Scene module teardown suppresses this signal while revoking queued dispatch.

Enums and constants

State


What is live on the platform today: platform capability status. Check availability at runtime before you offer a feature.