in reply to Threads Printing Issue - Output Mangled / Term Crashing

It's a problem that I haven't run into, despite doing something similar. Without wanting to contradict the excellent advice thus far, my suggestion would be to create an 'IO' thread - feed it via a Queue, and have it simply handle serialising the input/output operations. Which is especially significant when doing file writes, but I'd imagine similar problems are applicable, since you've still got buffering to contend with.

  • Comment on Re: Threads Printing Issue - Output Mangled / Term Crashing

Replies are listed 'Best First'.
Re^2: Threads Printing Issue - Output Mangled / Term Crashing
by bigbot (Beadle) on Apr 16, 2014 at 08:24 UTC
    Yeah I really need to become familiar with Queue. So far I've done everything with locks, but sooner or later...