Is it possible to create a generic thread that you create multiple times, but with a different passed parameter and have those tasks run independently?
Specificially I have a thread that opens a file on an SD card, reads info off the file in small chunks and sends it to another thread to process. I’d really like to be able to create that thread up to six times, each time passing the path to file on the SD card to open as the thread’s parameter, then that thread pass values back to another thread via a queue. So, I could have a few files open at the same time with each instance of the SD card reading thread passing information via the [same] queue.
Once I’d finished with it, I’d then destroy the thread.
Is that possible/sensible/stupid?