Has anyone tried to mixe Static & Dynamic Task Creation?

I thought I would have core tasks that always existed and couldn’t be deleted, and then incorporate dynamic tasks to handle ethernet port connections. When those connections dropped, I would free the resources and delete the associated tasks. This would be slightly more efficient than having all tasks dynamically allocated since the resources for the core tasks would always be know ahead of time.

Has anyone tried to mixe Static & Dynamic Task Creation?

I’ve done it, but mostly out of working on converting things from Dynamic to Static and not gettting that job totally finished, and some of it due to having to detect hardware configuration at startup before starting a task, and with my wrappers that makes it easier to be dynamic. Personally for Ethernet connections, I would be tempted to see if I couldn’t just preallocate a set of tasks in a pool that are selected when a connection come in, and when done put themselves back into the pool and sleep. The main exception would be if I NEEDED to dynamically trade number of connections running vs some othe use of resources, and even then I might allocate a few tasks for base needs and only allocate the extras dynamically.

Has anyone tried to mixe Static & Dynamic Task Creation?

I’ve done it, but mostly out of working on converting things from Dynamic to Static and not gettting that job totally finished, and some of it due to having to detect hardware configuration at startup before starting a task, and with my wrappers that makes it easier to be dynamic. Personally for Ethernet connections, I would be tempted to see if I couldn’t just preallocate a set of tasks in a pool that are selected when a connection come in, and when done put themselves back into the pool and sleep. The main exception would be if I NEEDED to dynamically trade number of connections running vs some othe use of resources, and even then I might allocate a few tasks for base needs and only allocate the extras dynamically.