Created
November 13, 2018 20:36
-
-
Save nlharri/8ab4332015837032c232d5a6f2f9f773 to your computer and use it in GitHub Desktop.
WifiScannerLinux - registration of Wi-Fi scanner thread
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a std::promise object | |
std::promise<void> exitSignal; | |
//Fetch std::future object associated with promise | |
std::future<void> futureObj = exitSignal.get_future(); | |
// Starting Thread & move the future object in lambda function by reference | |
std::thread th(&wifiScannerThread, std::move(futureObj), wifiIfName, wifiAPCollection); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment