Problem
Currently, the Ixion standard async library creates a new thread for each task, but this is inconvenient if the user program wants to run multiple tasks.
Proposal
The simplest approach at the moment is to use a thread pool. After a task completes, we don't delete the thread, but rather place it in the pool. If the user program starts another task, we don't create a new thread, but reuse the thread from the pool.
Note
We also need to clean up the pool. For example, if a thread has been in the pool for more than X amount of time (e.g., 25 seconds), we delete that thread.
Problem
Currently, the Ixion standard
asynclibrary creates a new thread for each task, but this is inconvenient if the user program wants to run multiple tasks.Proposal
The simplest approach at the moment is to use a thread pool. After a task completes, we don't delete the thread, but rather place it in the pool. If the user program starts another task, we don't create a new thread, but reuse the thread from the pool.
Note
We also need to clean up the pool. For example, if a thread has been in the pool for more than X amount of time (e.g., 25 seconds), we delete that thread.