This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Difference between execute, submit and invoke()  RSS feed

 
Nick Widelec
Ranch Hand
Posts: 226
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I have got the following class which runs and compiles (you can try it out). The only thing puzzles me a little is that at the end in the main it works fine with fj.invoke(task) but it does not with fj.execute(task) and fj.submit(task). I don't get any output with the latter ones. From the API it should be working with the other methods too they perform the task.. even if they either return or not a value they should still perform the task. What am I missing here?


You can try it out simply by copy and paste the code, by replacing fj.invoke(new RecursiveTaskActionThing(500)); with fj.execute(new RecursiveTaskActionThing(500)); or with fj.submit(new RecursiveTaskActionThing(500)); it won't spit out any output... I am wondering why.

Thanks in advance.
 
Nick Widelec
Ranch Hand
Posts: 226
Eclipse IDE Firefox Browser Ubuntu
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!