Fixes for thread state changes

This commit is contained in:
Willy-JL
2024-10-09 03:23:44 +01:00
parent 34d4ef0366
commit 5fb391641e
2 changed files with 3 additions and 12 deletions

View File

@@ -1,21 +1,12 @@
#include "run_parallel.h"
#include <core/timer.h>
#include <stdlib.h>
static void run_parallel_pending_callback(void* context, uint32_t arg) {
UNUSED(arg);
FuriThread* thread = context;
furi_thread_join(thread);
furi_thread_free(thread);
}
static void run_parallel_thread_state(FuriThreadState state, void* context) {
static void run_parallel_thread_state(FuriThread* thread, FuriThreadState state, void* context) {
UNUSED(context);
if(state == FuriThreadStateStopped) {
furi_timer_pending_callback(run_parallel_pending_callback, furi_thread_get_current(), 0);
furi_thread_free(thread);
}
}