Task

shutdown/2

shutdown(task, timeout \\ 5000)

Unlinks the given %Task{} and shuts it down, returning nil. The task can no longer be awaited.

If the task replies while it is being shut down, the reply is returned as {:ok, result}.

If the task doesn’t exit within timeout milliseconds (default 5000), it is killed and {:exit, reason} is returned.