thank you very much. of course you are right. never. it is only an example that shows the problem.
i am writing a compiling from brainfuckconsole74.ch (a brainfuck videoconsole) to processing.
https://www.brainfuckconsole74.ch
and so i need a thread for processing the data and every 40ms to draw routine independent from it the first 256 cells (which are also the videomemory). and so i only want to draw every 40ms and i had to wait in the processing routing till the next draw routine is coming up or if it was there once or several time to draw at once.
and i am not yet sure if this is the simplest implementation. but it is one. and will be different in c++ or csharp .-) no drawroutine like this.
but you are right. never split a counter over several threads. at the end i need only an if condition in the thread process to go draw in the draw process.
but anyway you helped a lot !!!
another point for the coders* heaven .-)