Add :limit option to Task.yield_many/2
Module
Task
34 changes across 21 versions
Changes by version
Remove head of line blocking on Task.yield_many/2
Enable selective receive optimizations in Erlang/OTP 26+
Reduce tasks footprint by avoiding unecessary work during spawning
Do not double log Task failure reports
Add :zip_input_on_exit option to Task.async_stream/3
Store :mfa in the Task struct for reflection purposes
Ensure async streams can be consumed from another process than the one that creates them
Add Task.completed/1
Add Task.ignore/1 to keep a task running but ignoring all of its results
Reduce the amount of copying Task.async* functions
Ensure Task.async_stream/2 with ordered: false discard results as they are emitted, instead of needlessly accumulating inside the stream manager
Raise if :max_concurrency is set to 0 on streaming operations
Add Task.await_many/2
Include callers in translated Logger metadata for Task
Fix Task PID and caller in Task Supervisor reports
Do not crash async_stream monitor if it receives spurious DOWN messages
Add $callers tracking to Task - this makes it easier to find which process spawned a task and use it for tracking ownership and monitoring
Improve error reports and exit reasons for failed tasks on Erlang/OTP 20+
Support :infinity timeout on Task.yield_many/2
Support :infinity timeout on Task streams
Support :on_timeout in Task.async_stream to control how tasks are terminated
Add ordered: false support to Task.async_stream
Add Task.async_stream/3 and Task.async_stream/5 as well as the supervised versions Task.Supervisor.async_stream/4 and Task.Supervisor.async_stream/6
Fix Task.shutdown/1,2 infinite block when task has no monitor
Ensure task cannot link after parents unlinks
Task.find/2 is deprecated in favor of explicit message matching
Add Task.Supervisor.async_nolink/1/3 that spawns a supervised task without linking to the caller process
Introduce Task.yield_many/2
Raise an error when a task is queried from a non-owning process (instead of waiting forever)
Introduce Task.yield/2 and Task.shutdown/2 to check if a task is still executing and shutdown otherwise
Set :proc_lib initial call on task to aid debugging
Log when tasks crash
Tasks are automatically linked to callers and a failure in the task will crash the caller directly