Prefer try-lock in process-callback
This commit is contained in:
parent
79e6830d21
commit
57017267cf
|
@ -339,7 +339,12 @@ AudioEngine::process_callback (pframes_t nframes)
|
|||
}
|
||||
/* release latency lock, **before** reacquiring process-lock */
|
||||
ll.release ();
|
||||
tm.acquire ();
|
||||
/* this should not be able to fail, but it is good practice
|
||||
* to only use try-lock in the process callback.
|
||||
*/
|
||||
if (!tm.try_acquire ()) {
|
||||
return 0; // XXX or spin?
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user