Skip to content

[hmr] AsyncBatch and async notify for signals? 🤔 #557

@CNSeniorious000

Description

@CNSeniorious000

Cases exist when we want to await all the async effects to finish after updating a signal.

Of course you can argue that user can provide a customized task_factory for AsyncEffect to await them when they want this. But maybe users can't control the construction of those effect? It would be good if we can:

arr = reactive([])

@AsyncEffect
async def show_length():
    await sleep(1)
    print(len(arr))

async with Batch():
    arr.append(1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions