Hi guys, nice to be here again!
I have a little question about threads. I have a project where there is a
thread which
is doing something, and that "doing something" is simulated by sleep().
I have to implement a way to stop for a moment that "doing something" by a wait() call,
time in which the thread would save its state(to be implemented in a second moment).
I tried to implement that in the following way:
Actually, it doesn't stop the 5 seconds sleeping, but it waits for the sleep to finish and then it simulates the stopping.
My question is:
do you know a nice way to tell the sleeping to stop with the wait() calling?
Thank you very much for your attention!
maribo