The advice I've seen from Freenode's #perl is "Don't use threads, use an Async library instead".
From perlbot: async "Asynchronous event-driven IO is awesome in Perl with POE, Future/IO::Async, IO::Lambda, Mojo::IOLoop, Reflex, or Promises, among others."
Perhaps some monks more familiar with the above modules can implement your example in them.
I've done your problem with my own Async::Tiny and it's approximately the same length
and works without any weird problems. I can show you if you're interested.
In reply to Re: Weird Output with Threads and NCurses
by Anonymous Monk
in thread Weird Output with Threads and NCurses
by var121
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |