fix 'already borrowed' panic with large pastes

This commit is contained in:
Wez Furlong committed 2019-06-02 13:00:30 -07:00
1 parent 3f16979067
commit 74bbf01014
1 file changed
+5 -1
+5 -1
View File
@@ -327,8 +327,12 @@ impl GuiEventLoop {
}
}
fn pop_gui_thread_send(&self) -> Option<SpawnFunc> {
self.gui_thread_sends.borrow_mut().pop_front()
}
fn process_gui_exec(&self) -> Result<(), Error> {
while let Some(func) = self.gui_thread_sends.borrow_mut().pop_front() {
while let Some(func) = self.pop_gui_thread_send() {
func();
}