Questions tagged [event-wait-handle]

51 questions
0
votes
2 answers

Synchronizing Thread and Event

In my console application, Synchronizing the events within in thread makes difficult. using System; using System.Threading; using System.Windows.Forms; namespace ConsoleApplication1 { public class Example { private static Button…
0
votes
2 answers

Multiple Processes & Wait Handles

Based upon this question i decided to try to use waithandles/eventwaithandle for my solution based upon Jim Mischel recommendation. I "almost" have it working. Here is the code Private Sub InitDeploymentCheck() moDeploymentCheck = New…
coding4fun
  • 8,038
  • 13
  • 58
  • 85
-1
votes
1 answer

EventWaitHandle waitOne() causes my worker thread to suspend until it has timed out

I am using a EventWaitHandle() handler. This handler is called in a ButtonClick event that waits for 10 seconds. There is another worker thread which upon receiving some data call Set() on the handler. Problem is the WaitOne() returns false after…
Ejob
  • 1
  • 2
-1
votes
1 answer

synchronization through EventWaitHandle not working as expected

so basically this is the code I've been testing static void Main(string[] args) { var result = 0; EventWaitHandle calcDone = new EventWaitHandle(false, EventResetMode.ManualReset); ThreadPool.QueueUserWorkItem((x) => { result +=…
Dimitri
  • 2,798
  • 7
  • 39
  • 59
-1
votes
1 answer

how to suspend certain threads using EventWaitHandler

I have this process with two threads in it. and a form that has buttons (start, suspend, pause, resume). whenever I suspend using the EWH.WaitOne() the whole application freezes (suspends) and I can't press the resume button any more Is there a way…
Wissam Habib
  • 9
  • 1
  • 7
-2
votes
2 answers

Why is non awaited Task blocking

I am launching 2 tasks , without await-ing them , and one of them is depending on the other. I am trying to understand why is the following snipped of code blocking. public class Tasks { EventWaitHandle handle = new EventWaitHandle(false,…
Bercovici Adrian
  • 8,794
  • 17
  • 73
  • 152
1 2 3
4