Skip to content

Commit

Permalink
Avoid using Task in the next tries
Browse files Browse the repository at this point in the history
  • Loading branch information
philss committed Jul 6, 2023
1 parent d6a323e commit 94b2b75
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/rustler_precompiled.ex
Original file line number Diff line number Diff line change
Expand Up @@ -833,9 +833,7 @@ defmodule RustlerPrecompiled do
wait_in_ms = :rand.uniform(count * 2_000)
Process.sleep(wait_in_ms)

task = Task.async(fun)

{:cont, Task.await(task, :infinity)}
{:cont, fun.()}
end
end)
end
Expand Down

0 comments on commit 94b2b75

Please sign in to comment.