Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. // Following sample shows simple case of executing task asynchronously without blocking current thread.
  2. // This is extremely handy for tasks which are not so important to block the execution of main program
  3. // and we do depend on their execution results.
  4. AsyncUtil.with(message).plan(MailSerializerUtil::toTempDir).async();
  5.  
  6. // It's also posible to chain async tasks plans
  7. AsyncUtil.with(message)
  8. .plan(MailSerializerUtil::toTempDir)
  9. .plan(MailSerializerUtil::logMessage)
  10. .async();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement