Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- // services start asynchronously when instantiated, or if necessary,
- // via a call to a start() method
- BackgroundService servA;
- // the main application code can send messages (for example, strings),
- // to the service, which it asynchronously processes
- servA.processMessage("foo");
- // when the service object goes out of scope, the background service
- // terminates. Depending on desired behavior, we may want the main
- // app to wait on the termination
- return 0;
- }
Add Comment
Please, Sign In to add comment