Guest User

Untitled

a guest
Jun 18th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. int main()
  2. {
  3. // services start asynchronously when instantiated, or if necessary,
  4. // via a call to a start() method
  5. BackgroundService servA;
  6.  
  7. // the main application code can send messages (for example, strings),
  8. // to the service, which it asynchronously processes
  9. servA.processMessage("foo");
  10.  
  11. // when the service object goes out of scope, the background service
  12. // terminates. Depending on desired behavior, we may want the main
  13. // app to wait on the termination
  14. return 0;
  15. }
Add Comment
Please, Sign In to add comment