Created
December 5, 2010 06:42
-
-
Save apathyboy/728880 to your computer and use it in GitHub Desktop.
Waiting to trigger an event until a collection of futures has returned.
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
dispatch.notify_when(server_started_event, [=] { | |
if (crafting.is_ready() && trade.is_ready() && travel_map.is_ready()) { | |
cout << "All startup tasks have finished, dispatch this event!\n"; | |
return true; | |
} | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment