[BUG]ProgressBar not responsive to `set_value`
bug
**Describe the bug**
I've been trying to use ProgressBars in a somewhat complex async environment, though all the Cursive stuff is happening in main. I've had to split `run()` in to my own loop with `step()` and `refresh()`. I can't seem to get `set_value()` to do anything, and that would be my preferred route, but I could make do with `with_task()`, `start()` and the counter method, but those have a different issue.
When I try and use the `Counter`-based methods, it appears that the task used to check the `Counter` in `ProgressBar` only executes once. There doesn't seem to be a subsequent call. I'm not sure if this is due to thread starvation??
**To Reproduce**
I'm working a blog series for finding duplicate files using Rust. I was adding a Cursive TUI. Here's the most recent blog post: https://housedillon.com/blog/dupes2/
and the repo:
https://git.housedillon.com/wdillon/rust_duplicates
The easiest way to repo is to clone that repo and run:
`cargo run -- --db-file test.parquet -i -s 60 -t 16 -- ./`
That'll scan the git checkout for duplicate files, saving a database at test.parquet using interactive mode with checkpoints every 60 seconds and using 16 threads
**Expected behavior**
In an ideal world, `set_value` would change the value of the bar. Additionally, using the task and counter methods would work when used in conjunction with Tokio.
**Environment**
* OS: Arch Linux
* Backend used: ncurses (the default one)
* Current locale: LANG=en_US.UTF-8
* Cursive version: "0.21.1"
1 条评论