core: Don't start new tasks as we're shutting down. #108
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 31m40s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 31m40s
This commit is contained in:
@ -119,6 +119,7 @@ typedef struct _tf_task_t
|
||||
bool _trusted;
|
||||
bool _one_proc;
|
||||
bool _killed;
|
||||
bool _shutting_down;
|
||||
char _scriptName[256];
|
||||
int _global_exception_count;
|
||||
|
||||
@ -1818,6 +1819,8 @@ JSValue tf_taskstub_kill(tf_taskstub_t* stub);
|
||||
|
||||
void tf_task_destroy(tf_task_t* task)
|
||||
{
|
||||
task->_shutting_down = true;
|
||||
|
||||
while (task->_children)
|
||||
{
|
||||
for (task_child_node_t* node = task->_children; node; node = node->next)
|
||||
@ -2162,6 +2165,11 @@ void tf_task_set_android_service_callbacks(tf_android_start_service_t* start_ser
|
||||
s_android_stop_service = stop_service;
|
||||
}
|
||||
|
||||
bool tf_task_is_shutting_down(tf_task_t* task)
|
||||
{
|
||||
return task && task->_shutting_down;
|
||||
}
|
||||
|
||||
tf_android_start_service_t* tf_task_get_android_start_service()
|
||||
{
|
||||
return s_android_start_service;
|
||||
|
Reference in New Issue
Block a user