Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2014
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. public boolean outerMethod()
  2. {
  3. boolean success= performTask();
  4.  
  5. if( success == false )
  6. {
  7. return false;
  8. }
  9.  
  10. // more processing here if success == true
  11. }
  12.  
  13. public void run()
  14. {
  15. boolean success = performTask();
  16.  
  17. if( success == false )
  18. {
  19. /* here is where I want to exit this thread */
  20. }
  21.  
  22. // further processing if success == true
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement