You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to refactor this for a dialyzer error that seemed like it was mostly benign, but then I realized there may be a logic error here which (surprisingly) neither the compiler nor dialyzer picked up. Follow this logic:
timeout() returns a non-nil value
a Task is launched calling handle_notify/3
If the Task yields in time, we have the case statement
The task yielded a value! {:ok, {:ok, new_state}} -> {:noreply, state} ... but we returned the old state anyway just like if the Task didn't yield in time? Why?
The text was updated successfully, but these errors were encountered:
cachex/lib/cachex/hook.ex
Lines 165 to 182 in 5b8983e
I was trying to refactor this for a dialyzer error that seemed like it was mostly benign, but then I realized there may be a logic error here which (surprisingly) neither the compiler nor dialyzer picked up. Follow this logic:
{:ok, {:ok, new_state}} -> {:noreply, state}
... but we returned the old state anyway just like if the Task didn't yield in time? Why?The text was updated successfully, but these errors were encountered: