await methods for async tasks #65

Closed
opened 2025-06-06 09:37:01 +00:00 by ElhamAryanpur · 0 comments
ElhamAryanpur commented 2025-06-06 09:37:01 +00:00 (Migrated from github.com)

The async tasks as of now has no way of yielding or awaiting. A syntax such as:

spawn_task(function ()
    -- my async code
end):await()

and internally:

methods.add_async_method("await", |_, this, ()| {
    this.0.await;
    Ok(())
});

could be added to add ability for the task to be awaited.

The async tasks as of now has no way of yielding or awaiting. A syntax such as: ```lua spawn_task(function () -- my async code end):await() ``` and internally: ```rs methods.add_async_method("await", |_, this, ()| { this.0.await; Ok(()) }); ``` could be added to add ability for the task to be awaited.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ArkForgeLabs/Astra#65
No description provided.