Skip to content

Commit 05d65bf

Browse files
cursoragentmyungjoo
andcommitted
fix: join stale receive thread before creating new one
Co-authored-by: MyungJoo Ham <myungjoo.ham@samsung.com>
1 parent a002093 commit 05d65bf

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

c/src/ml-api-service-training-offloading.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,11 @@ _training_offloading_check_received_data (ml_training_services_s * training_s)
570570

571571
g_return_val_if_fail (training_s != NULL, FALSE);
572572

573+
if (training_s->received_thread) {
574+
g_thread_join (training_s->received_thread);
575+
training_s->received_thread = NULL;
576+
}
577+
573578
training_s->received_thread = g_thread_new ("check_received_file",
574579
_check_received_data_thread, training_s);
575580

0 commit comments

Comments
 (0)