mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-04-28 13:40:40 +02:00
fp-image: Do not start thread detection task thread if already running
This commit is contained in:
parent
2b008b52d7
commit
5a1253e37c
1 changed files with 5 additions and 2 deletions
|
|
@ -474,8 +474,11 @@ fp_image_detect_minutiae (FpImage *self,
|
|||
|
||||
if (!g_atomic_int_compare_and_exchange (&self->detection_in_progress,
|
||||
FALSE, TRUE))
|
||||
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_ADDRESS_IN_USE,
|
||||
"Minutiae detection is already in progress");
|
||||
{
|
||||
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_ADDRESS_IN_USE,
|
||||
"Minutiae detection is already in progress");
|
||||
return;
|
||||
}
|
||||
|
||||
g_task_run_in_thread (g_steal_pointer (&task),
|
||||
fp_image_detect_minutiae_nbis_thread_func);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue