View Source Ash.Actions.Read.AsyncLimiter (ash v3.4.49)

A utility for limiting the number of concurrent async operations

Because this is an optimization, we opt to run something synchronously if there is no async task available in the slot. The idea here is that the vast majority of things we do async will be fast enough not to warrant always waiting for an async slot to be free. We may add in some smarter heuristics later (i.e choosing to wait for a task instead of doing the work sync), but for now this is a good start.

Summary

Functions

async_or_inline(query, opts, last?, func)

await_all(list)

await_at_least_one(list)

child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(limit)