when i click on a button, i would like to start action. When theses both actions would be finish, i want to start another action, this one need the result of both actions previous terminated.
ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
In addition to showing what you have tried and where you have problems, consider this:
You have two actions that need to run sequentially, and whose results need to be shared. Threads are about running code concurrently, which you don't need. Sharing results between threads requires synchronization, which can be complicated. So why are you considering using Threads for this application when you don't need them for what they do and only complicate matters? Why not just run task 1 to completion, then run task 2 to completiion in the same code stream?
mark smith wrote:i think a solution would be to start 2 thread and use join on them to start another operation
Well, that's what I was going to suggest: to wait for a Thread to finish, you call its join() method. But it looks like you have figured that out for yourself. So can we flag this thread as resolved?
When all four tires fall off your canoe, how many tiny ads does it take to build a doghouse?
a bit of art, as a gift, that will fit in a stocking