 
   # We already have n=schedulers currently running, don't spawn new ones
   defp spawn_workers(%{queued: queued, waiting: waiting, schedulers: schedulers} = state)
-      when length(queued) - length(waiting) >= schedulers do
+       when length(queued) - length(waiting) >= schedulers do
     wait_for_messages(state)
   end
 

    waiting =
      case List.keytake(waiting, ref, 2) do
        {{_kind, pid, ^ref, _on, _defining}, waiting} ->
          send pid, {ref, found}
          waiting
        nil ->
          waiting
      end
    spawn_workers(%{state | entries: t, waiting: waiting})
  end


        # Sometimes we may have spurious entries in the waiting
        # list because someone invoked try/rescue UndefinedFunctionError
        new_entries = List.delete(entries, child_pid)
        new_queued = List.keydelete(queued, child_pid, 0)
        new_waiting = List.keydelete(waiting, child_pid, 1)
        spawn_workers(%{state | entries: new_entries, waiting: new_waiting, queued: new_queued})

