mirror of
https://github.com/lotabout/skim.git
synced 2026-09-10 07:16:23 -04:00
[controller] fix input delay when there are a lot data to read.
the problem is that the controller will save all items read before send the NewItem event to matcher. Meanwhile the matcher keeps going because no signal is received. And since the controller will need to lock the data of items and that lock is not released by matcher. Kind of deadlock here.
This commit is contained in:
parent
2713175ec0
commit
fc6882e826
|
|
@ -67,11 +67,11 @@ fn main() {
|
|||
for (e, val) in eb.wait() {
|
||||
match e {
|
||||
Event::EvReaderNewItem | Event::EvReaderFinished => {
|
||||
eb_matcher.set(Event::EvMatcherNewItem, Box::new(true));
|
||||
let mut items = model.items.write().unwrap();
|
||||
while let Ok(string) = rx_source.try_recv() {
|
||||
items.push(string);
|
||||
}
|
||||
eb_matcher.set(Event::EvMatcherNewItem, Box::new(true));
|
||||
}
|
||||
|
||||
Event::EvMatcherUpdateProcess => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue