I am trying to write the frame captured from my laptop camera in to a circular buffer. I wanted to create a thread to handle this task (in an asynchronous way). When i try t