Now I found one solution: Since obviously my println command with multiple arguments causes as many times a yield(), I have to compose my output string before printing it. With
using Printf
function tpr(ch::Channel)
...
print(@sprintf("%s %s\n", msg.a, msg.b))
...
end
I get the right printouts:
julia> put!(ch, Msg("first", "second"))
first second
Msg("first", "second")
julia> put!(ch, Msg("first", "second"));
first second
julia>