I have created a function Listener((*insert)(),(*eject)()) which accepts two call back functions insert and eject. The function Listener listens to any hardware change like a usb plugged in or plugged out. Whenever a device is connected, the call back function insert is called and whenever a device is plugged out the eject method is called. So the Listener method runs as soon as the code is run and keeps running till I close the console. Now I want to use a method say UserDecision() which would ask user if they want do something from a list of option. I want this function to run regardless of the listener function running. So basically I want to run two functions simultaneously. Give me a direction on ways this may be done
mardi 14 avril 2020
Run a function when another function is already running
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire