How to delay tasks at Task.async_stream?

Can I delay the execution of tasks that are generated when using Task.async_stream? I am handling thousands of entries, I am thinking to distribute the starting time for tasks into a range of 10 seconds, rather than having all tasks start immediately?

Why not set a maximum number of concurrent executions? Task.async_stream/5

Task.async_stream(Enum, Mod, Fun, args, [max_concurrency: 10])

in the above example it’ll kick off at most 10 concurrent executions at a time. This would effectively delay execution of the later tasks until the earlier ones finish, which is what it sounds like you are trying to accomplish.

Yea, this would solve the issue