Appearance
@luminaphoto/lumina-js / Client / SmartOperationQueue
Class: SmartOperationQueue
Smart dual-queue system that separates preview and apply operations
Features:
- Preview operations can be cancelled when apply/undo/redo occurs
- Apply operations never wait for preview operations
- Automatic cleanup of stale preview operations
Constructors
Constructor
ts
new SmartOperationQueue(): SmartOperationQueue;Returns
SmartOperationQueue
Methods
dispose()
ts
dispose(): void;Dispose of the queue and cancel all pending operations
Returns
void
enqueueApply()
ts
enqueueApply<T>(operation): Promise<T>;Queue an apply/undo/redo operation that cancels all pending previews
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type | Description |
|---|---|---|
operation | () => Promise<T> | The apply operation to execute |
Returns
Promise<T>
Promise that resolves to operation result
enqueuePreview()
ts
enqueuePreview<T>(operation): Promise<T>;Queue a preview operation that can be cancelled
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type | Description |
|---|---|---|
operation | () => Promise<T> | The preview operation to execute |
Returns
Promise<T>
Promise that resolves to operation result or