fix import-thread SNAFU

* pressing Esc or WM close button did not cancel import thread
 * proper Abort does not wait for import thread either

It was possible to launch a 2nd (and Nth) import thread, all sharing
the Editor's ImportStatus data-structure, all having the same
registered thread-name and same thread-pool name.  Plenty of room for
crashes.
This commit is contained in:
Robin Gareus 2016-05-21 23:30:11 +02:00
parent 9ad096b611
commit 03660573e2
3 changed files with 13 additions and 1 deletions

View file

@ -507,7 +507,10 @@ Editor::import_sndfiles (vector<string> paths,
gtk_main_iteration ();
}
import_status.done = true;
// wait for thread to terminate
while (!import_status.done) {
gtk_main_iteration ();
}
int result = -1;