0

I have one console application in which I have implement BackgroundWorker in loop for dynamically creating thread.If I am not give console.ReadKey() than close window immediately without process end. If I give than it waits for user Input for closing. I also try ManualResetEvent. In this if I am give

WaitHandle.WaitAll(_resetEvents) 

than console window not closed if not give than also same problem window closed before execution completion. In Thread.Sleep() if execution taken more time than given time-stamp than also Window close before completion.

Please give proper Solution for this problem.

captainsac
  • 2,484
  • 3
  • 27
  • 48
Kinjal Patel
  • 83
  • 3
  • 12

0 Answers0