Hi!.

I have a thread and a function that pass some value to the thread. The function must wait to pass the value until the thread is not longer occupied, (or for a milliseconds), and then the function must wait again for the work that make the thread with the value and finally the function return.
I know that I can fix my problem with events, that's the question, with C++ I use CreateEvent(), SetEvent(), WaitForSingleObject(), ResetEvent() but, How could I make that in C#?.
How can I create an event such a "ThreadFree", "ThreadOccupied", etc.

Thank you.