I tried to:
pid = spawn fn -> 1 + 2 end
IO.puts(pid)
IO.puts(IO.inspect(pid))
and both given a
** (Protocol.UndefinedError) protocol String.Chars not implemented for #PID<0.59.0>
There must be a way to get the "#PID<0.59.0>" representation of the pid
, since the REPL prints that #PID<0.59.0>
.
You don't need to wrap IO.inspect
in a call to IO.puts
. Simply calling IO.inspect
will do what you're looking for.
pid = spawn fn -> 1 + 2 end
IO.inspect(pid)
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments