mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
Fix TimeFX threading (detached thread must not be joined)
This commit is contained in:
parent
5f1e2d4961
commit
1776939dd3
1 changed files with 2 additions and 9 deletions
|
|
@ -301,7 +301,6 @@ Editor::time_fx (RegionList& regions, float val, bool pitching)
|
||||||
current_timefx->first_delete = current_timefx->signal_delete_event().connect
|
current_timefx->first_delete = current_timefx->signal_delete_event().connect
|
||||||
(sigc::mem_fun (current_timefx, &TimeFXDialog::delete_in_progress));
|
(sigc::mem_fun (current_timefx, &TimeFXDialog::delete_in_progress));
|
||||||
|
|
||||||
current_timefx->start_updates ();
|
|
||||||
|
|
||||||
if (pthread_create_and_store ("timefx", ¤t_timefx->request.thread, timefx_thread, current_timefx)) {
|
if (pthread_create_and_store ("timefx", ¤t_timefx->request.thread, timefx_thread, current_timefx)) {
|
||||||
current_timefx->hide ();
|
current_timefx->hide ();
|
||||||
|
|
@ -309,7 +308,7 @@ Editor::time_fx (RegionList& regions, float val, bool pitching)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
pthread_detach (current_timefx->request.thread);
|
current_timefx->start_updates ();
|
||||||
|
|
||||||
while (!current_timefx->request.done && !current_timefx->request.cancel) {
|
while (!current_timefx->request.done && !current_timefx->request.cancel) {
|
||||||
gtk_main_iteration ();
|
gtk_main_iteration ();
|
||||||
|
|
@ -408,12 +407,6 @@ Editor::timefx_thread (void *arg)
|
||||||
event loop doesn't die before any changes we made are processed
|
event loop doesn't die before any changes we made are processed
|
||||||
by the GUI ...
|
by the GUI ...
|
||||||
*/
|
*/
|
||||||
|
Glib::usleep(G_USEC_PER_SEC / 5);
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
Glib::usleep(2 * G_USEC_PER_SEC);
|
|
||||||
#else
|
|
||||||
struct timespec t = { 2, 0 };
|
|
||||||
nanosleep (&t, 0);
|
|
||||||
#endif
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue