0
I am in doubt in the use of threads, I want that, in a given time, the program stops responding and only comes back when I determine...
Example:
System.Threading.Thread.Pausa();
// Executa código
System.Threading.Thread.VoltaDnv();
How do I do that?
If I understand correctly, you want to lock the program. That’s right?
– Marcelo Vieira
If he’ll be standing still like he’ll know when to come back?
– Jéf Bueno
It seems to me that you want to do some competition control... If so, there are alternatives ready and well thought out for this.
– Jéf Bueno
It will know when to come back when you go to System.Threading.Thread.Voltadnv(); which is when you finish the lines of code in the // Run code
– Lucas Bittencourt
So, by clicking the button, the program will lock and be resized, and after being resized, it will unlock
– Lucas Bittencourt
If it is paused, how will you get there? It is better to explain what you want, because it seems that this is the wrong mechanism for the task.
– Maniero
When I download a file, does the program not lock and unlock when it finishes downloading? Of course, not in the asynchronous method. Got it?
– Lucas Bittencourt
Please edit your question by putting an example, so it will be simpler to understand.
– Marcelo Vieira
You’re trying to do this the wrong way.. This pausing to do another task... has to be an asynchronous one. What’s wrong with using async? or Background worker that is?
– Thiago Loureiro