Closed NetForces closed 7 years ago
Hi @NetForces , Thanks!
Yes, you can use multiple threads mapping to the same callback. However, there is no current way to pass on arguments to the threads.
But, you can create a custom thread that accepts a custom callback signature (with the parameters you want). Is your intention to identify the caller Thread? If so that's the best approach.
Yup exactly I want to know the calling thread so that the behavior in the tread changes slightly instead of having 95% of the same code in unique callback function per thread.
Do you have an example n how I can create such a 'custom callback signature' ?
Also, check what @tlextrait did with a Fork of this project. He managed to get callbacks with it: https://github.com/tlextrait/ArduinoThread
Just so I don't need to fork your library I'll leave it as is right now. Thanks again for your time and effort.
Hi,
First awesome library. Kudos on the work.
Is is possible to have multiple threads calling the same callback ?
Is it also possible to pass arguments to the thread ? If so can you share an example ?
Thanks.