mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-07-17 15:56:57 +02:00
term: move output to end; move from_dsl
This commit is contained in:
parent
7613c65500
commit
dd7091bda1
3 changed files with 46 additions and 43 deletions
|
|
@ -97,13 +97,18 @@ use ::{
|
|||
}
|
||||
|
||||
/// Spawn the TUI output thread which writes colored characters to the terminal.
|
||||
///
|
||||
/// ```
|
||||
/// let state = Arc::new(RwLock::new(()));
|
||||
/// Exit::run(|exit|tui_output(exit, state, sleep, stdout()))
|
||||
/// ```
|
||||
pub fn tui_output <
|
||||
W: Write + Send + Sync + 'static, T: View<Tui> + Send + Sync + 'static
|
||||
> (
|
||||
output: W,
|
||||
exited: &Arc<AtomicBool>,
|
||||
state: &Arc<RwLock<T>>,
|
||||
sleep: Duration
|
||||
sleep: Duration,
|
||||
output: W,
|
||||
) -> Usually<Task> {
|
||||
let state = state.clone();
|
||||
stdout().execute(EnterAlternateScreen)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue