Details
-
Task
-
Status: In Progress (View Workflow)
-
Major
-
Resolution: Unresolved
-
Q2/2026 Server Development
Description
What is the way to create another worker thread from the SQL layer?
- Initially we should use a server variable that will control how many workers to create
- We should request workers from the thread pool (right?)
- And return them to the thread pool when they are done.
Code a basic function that will
- request N workers
- Let these workers do something
- Then return control to the main thread.
- The main thread should wait for workers to finish (and start processing their result as soon as they are done).
Followups to this task:
- workers should be intialized to use MariaDB internal environment (mysys, etc)
TODO - first things
- Study the threadpool code to answer the above questions: (AI may also help with this)
- How to get a worker thread
- How to return a thread
- How does one wait for multiple worker threads at the same time and handle them as soon as they terminate, provided they can do it in an arbitrary order?