I am having the same trouble with a tty too. I ended up with pthread_kill to signal the specific goroutines blocked in read: https://play.golang.org/p/VZhm2-dX0B The two goroutines share their ids and wait for each other's completion with a signal.
I am not sure how safe it is. But it does the job for now... I think a special io.Reader using a select() would be safer. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.