terminal

Function terminal 

Source
pub async fn terminal(inbox: Receiver<Val>, back: Sender<Event>)
Expand description

The interactive console: ('write v), ('line v) and ('read prompt) on one peer, because ordering between printing and prompting is the whole difficulty. Sharing one inbox makes the channel’s order the screen’s order; two channels would let a print land mid-line. Reading a tty line blocks, so a thread is occupied either way.

Registered under both stdout and stdin, so an object program says the same thing whether its output is a terminal or a pipe.