lundi 25 juillet 2016

How to initiate a std::thread calling a function that expects a function as a parameter?

I have a class member function that I wish to run in a std::thread and it expects a function as a parameter, as follows:

ModbusAgent::poolingThread(int position, std::function<int(int, uint16_t*)> readFunction)

So the question is: how can I instantiate a std::thread for calling that?

Aucun commentaire:

Enregistrer un commentaire