         Process.exit(pid, :kill)
 
         {_kind, ^pid, _, on, _} = List.keyfind(waiting, pid, 1)
-        description = "deadlocked waiting on module #{inspect on}"
+        description = "deadlocked waiting on module #{inspect(on)}"
         error = CompileError.exception(description: description, file: nil, line: nil)
         print_error(file, :error, error, stacktrace)
 
         {file, on, description}
       end
 
-    IO.puts """
-
+    IO.puts("""
+    
     Compilation failed because of a deadlock between files.
     The following files depended on the following modules:
-    """
+    """)
 
     max =
       deadlock
-      |> Enum.map(& &1 |> elem(0) |> String.length)
-      |> Enum.max
+      |> Enum.map(&(&1 |> elem(0) |> String.length()))
+      |> Enum.max()
 
     for {file, mod, _} <- deadlock do
-      IO.puts ["  ", String.pad_leading(file, max), " => " | inspect(mod)]
-    end
-
-    IO.puts ""
+      IO.puts(["  ", String.pad_leading(file, max), " => " | inspect(mod)])
+    end
+
+    IO.puts("")
 
     for {file, _, description} <- deadlock, do: {Path.absname(file), nil, description}
   end

        end

        # Release the module loader which is waiting for an ack
        send child, {ref, :ack}

        available = for {:module, _, ref, waiting_module, _defining} <- waiting,
                        module == waiting_module,
                        do: {ref, :found}

        cancel_waiting_timer(queued, child)

        spawn_workers(%{state | entries: available ++ entries, result: [{:module, module} | result]})

      # If we are simply requiring files, we do not add to waiting.
      {:waiting, _kind, child, ref, _on, _defining} when output == :require ->
        send(child, {ref, :not_found})
        spawn_workers(state)



  # 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
    wait_for_messages(state)
  end

