Skip to content

EntropyCanvas::AssetOperationHandle

Handle for tracking async asset operations. More…

#include <AssetOperationHandle.h>

Name
using AssetOpState< T >StateType
using EntropyEngine::Core::RefObject< StateType >StateRef
Name
boolwaitFor(std::chrono::milliseconds timeout) const
voidwait() const
boolvalid() const
uint64_ttotalBytes() const
AssetOpStatusstatus() const
const std::optional< T > &result() const
const StateRef &ref() const
boolisDone() const
StateType *get() const
const AssetOpErrorInfo &error() const
uint64_tbytesTransferred() const
AssetOperationHandle() =default
AssetOperationHandle(StateRef state)
template <typename T >
class EntropyCanvas::AssetOperationHandle;

Handle for tracking async asset operations.

Wraps RefObject<AssetOpState> with convenience methods. Copyable - multiple handles can reference the same operation.

Usage:

auto handle = client.resolve(assetId); // Returns immediately
// Option 1: Poll
while (!handle.isDone()) {
// Do other work
}
// Option 2: Wait with timeout
if (handle.waitFor(5000ms)) {
auto result = handle.result();
}
// Option 3: Block until complete
handle.wait();
using EntropyCanvas::AssetOperationHandle< T >::StateType = AssetOpState<T>;
using EntropyCanvas::AssetOperationHandle< T >::StateRef = EntropyEngine::Core::RefObject<StateType>;
inline bool waitFor(
std::chrono::milliseconds timeout
) const
inline void wait() const
inline bool valid() const
inline uint64_t totalBytes() const
inline AssetOpStatus status() const
inline const std::optional< T > & result() const
inline const StateRef & ref() const
inline bool isDone() const
inline StateType * get() const
inline const AssetOpErrorInfo & error() const
inline uint64_t bytesTransferred() const
AssetOperationHandle() =default
inline explicit AssetOperationHandle(
StateRef state
)

Updated on 2026-01-26 at 17:14:35 -0500