View Source NewRelic.Instrumented.Task (New Relic Elixir Agent v1.34.0)

Provides a pre-instrumented convienince module to connect non-linked Task processes to the Transaction that called them.

You may call these functions directly, or alias the module and continue to use Task as normal.

Example usage:

alias NewRelic.Instrumented.Task

Task.async_stream([1,2], fn n -> do_work(n) end)

Summary

Functions

async(fun)

See Task.async/1.

async(module, function_name, args)

See Task.async/3.

async_stream(enumerable, fun, options \\ [])

async_stream(enumerable, module, function_name, args, options \\ [])

await(task, timeout \\ 5000)

See Task.await/2.

await_many(tasks, timeout \\ 5000)

See Task.await_many/2.

child_spec(arg)

See Task.child_spec/1.

shutdown(task, timeout \\ 5000)

See Task.shutdown/2.

start(fun)

start(module, function_name, args)

start_link(fun)

See Task.start_link/1.

start_link(module, function_name, args)

See Task.start_link/3.

yield(task, timeout \\ 5000)

See Task.yield/2.

yield_many(task, timeout \\ 5000)

See Task.yield_many/2.