mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-10 10:35:16 +03:00
Ignore SendErrors when handling grammars (#2641)
When handling grammars, fetching and building is done in a thread pool. Results are communicated over channels and the receiving channel is closed on first error. This causes subsequent sends to fail causing a mess in stderr. This ignores all SendErrors causing only the first error to be printed.
This commit is contained in:
parent
378f438fb0
commit
f7c27b604f
@ -133,7 +133,9 @@ where
|
||||
let tx = tx.clone();
|
||||
|
||||
pool.execute(move || {
|
||||
tx.send(job(grammar)).unwrap();
|
||||
// Ignore any SendErrors, if any job in another thread has encountered an
|
||||
// error the Receiver will be closed causing this send to fail.
|
||||
let _ = tx.send(job(grammar));
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user