0

I would like to create a thread pool with two threads. I would like to ensure the first threads get executed first and after the completion of first thread then the second thread get start. Besides this, I need to pass Future result from first thread into second thread.

Any idea how to do this?

Please help.

Thanks.

nicholas
  • 2,581
  • 14
  • 66
  • 104
  • 1
    Not sure I understand the requirement fully. If you have two tasks, and one must follow the other, why do you need more than one thread per two tasks? Define a CombinedTask that calls both sub-tasks, one after the other, and submit to any old threadpool. – Martin James Dec 14 '12 at 14:48
  • Avoid using thread in this case – nicholas Jan 09 '13 at 03:03

1 Answers1

0

The situation is not suitable to use thread. Thus, avoid using thread.

nicholas
  • 2,581
  • 14
  • 66
  • 104