hi guys, here is question:
i have 2 threads: the main one and the other.
- on the main thread i perform anything gui related
- on the other thread i perform all my calculations
on some operation i have to stop the second thread for some seconds, waiting the first thread to do something....
my question:
which is the best option and why? being in the second thread..
- use sleepUntilDate
- use sleep function
- any other option?
the pseudo code is this:
on the second thread:
...
do some calculations
send the results to the first thread and wait for the # of seconds to wait (let's say K)
wait K seconds