Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# stop and continue

Tags:

c#

I need some way to do the following efficiently in C#:

Make program execution stop until certain value is changed.

Note: I do not want to make it with a while loop to avoid wasting cpu power..

Edit: And I want it to respond as quickly as possible after value has changed..

Edit: This will be inside my class method that is called by another code, however the value to be checked is inside my class... The method is supposed to wait until others code evaluate and change my value.. then it must continue to do its work.. unfortunately this is done many times(so I need to care for performance)

like image 637
Betamoo Avatar asked May 21 '10 19:05

Betamoo


People also ask

What C is used for?

C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...

What is the full name of C?

In the real sense it has no meaning or full form. It was developed by Dennis Ritchie and Ken Thompson at AT&T bell Lab. First, they used to call it as B language then later they made some improvement into it and renamed it as C and its superscript as C++ which was invented by Dr. Stroustroupe.

Is C language easy?

C is a general-purpose language that most programmers learn before moving on to more complex languages. From Unix and Windows to Tic Tac Toe and Photoshop, several of the most commonly used applications today have been built on C. It is easy to learn because: A simple syntax with only 32 keywords.

How old is the letter C?

The letter c was applied by French orthographists in the 12th century to represent the sound ts in English, and this sound developed into the simpler sibilant s.


1 Answers

Monitor.Wait and Monitor.Pulse

like image 88
treehouse Avatar answered Sep 21 '22 07:09

treehouse