I'm working with a camera and want to invoke asynchronously a thread from the delegate that handles a new frame that arrives
I tried:
Task.Factory.StartNew(() => Thread.Sleep(5000))
Thread t = new Thread(new ThreadStart(TestMethod));
t.Start();
camera = new CameraController();
camera.addFramesListener(frameHandler);
public void frameHandler(short[] frame, int indicator)
{
//handle new frame that arrived from the camera
//trying to run a new thread from here
}
I expect thread will run asynchronously without waiting for the thread to complete