Switch between threads in C #

I have software with several tabs. On each tab, I want to run different threads. When I switch from one tab to another, I pause the linked thread and then start a new thread for the new tab.

Sometimes, when I quickly change tabs, my threads stop working and do not give me any exceptions or errors. I understand this situation by debugging. In this situation, I see that there are many identical threads in the Threads Window, but none of them work.

I think that pausing and starting threads is not a good programming idea, but what should I do to avoid this problem?

+3
source share
2 answers

' .

, .

'

, , , . , , . , - , - . .

' , ,

! ? ? / ( Invoke/BeginInvoke) , .

! Coder! !

', , . . , "Threads Window" , "

. , , , .

" , - , , ?"

! - .

+3

- , :

  • "" .
  • , (.. , )
+3

All Articles