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 looked into this and discovered that the reason for the unexpected message was that wait_for_it spawns a waiter process to monitor for timeouts, but it was not properly killing the process when it was done waiting. I had been using Process.exit(waiter, :normal) to kill the waiter process but instead I needed to use Process.exit(waiter, :kill) to forcefully kill the waiter process. I've made this change in master and the next release will include this fix.
Note that if you are using WaitForIt in a GenServer.handle_call callback, your wait timeout must be less than the timeout used when invoking GenServer.call, which by default is 5 seconds. Otherwise, your GenServer.call will timeout before your WaitForIt.wait call times out, leading to the following error:
** (exit) exited in: GenServer.call(ExampleGenserverWaitforitBug, {:request_greeting, "worldz"}, 5000)
** (EXIT) time out
link to example to reproduce = https://github.com/cincinnati-elixir/example_genserver_waitforit_bug
The text was updated successfully, but these errors were encountered: