Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

pause and resume thread C#

var mrse = new ManualResetEvent(false);

public void Run() 
{ 
    while (true) 
    { 
        mrse.WaitOne();
        printMessageOnGui("Hey"); 
        Thread.Sleep(2000); . . 
    } 
}

public void Resume() => mrse.Set();
public void Pause() => mrse.Reset();
Comment

PREVIOUS NEXT
Code Example
Csharp :: Bitwise Left Shift C# 
Csharp :: psobject get service name 
Csharp :: c# UserControl make background transparent 
Csharp :: .net core 3 entity framework constraint code first image field 
Csharp :: office open xml check if row is empty 
Csharp :: delay a function on winform 
Csharp :: c# function to validate decimal upto p(25,2) 
Csharp :: how to perform drop down when click on combobox in c# net 
Csharp :: != in f# 
Csharp :: List foreach 
Csharp :: add auto mapper in startup 
Csharp :: Deserialize a Dictionary 
Csharp :: OIUJHKJHSKAL::KSAJ 
Csharp :: external font family uwp c# 
Csharp :: using Tls12 .net 3.5 
Csharp :: convert iqueryable to list c# 
Csharp :: c# datatable column alias 
Csharp :: lambda not null c# 
Csharp :: unity get object position on screen 
Csharp :: c# timestamp 
Csharp :: function documentation c# exception 
Csharp :: cefsharp not passing keydown to form 
Csharp :: get innermost exception c# 
Csharp :: Store Images In SQL Server Using EF Core And ASP.NET Core 
Csharp :: unity prefab button not working 
Csharp :: alpahbet incremnet in c# 
Csharp :: my object is falling unity 
Csharp :: using selected item in listbox c# to fill texbox 
Csharp :: c# download image from url 
Csharp :: how to use span c# 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =