title: Refresh a NSOpenGLView within a loop without letting go of the main runloop in Cocoa
body: <p>I am building an Cocoa/OpenGL app, for periods of about 2 second at a time, I need to control every video frame as well as writing to a digital IO device. 
  If after I make the openGL calls I let go of the main thread (like if I make the openGL calls inside a timer fire-method with an interval of like 0.01 Sec) openGLview is refreshed with every call to <code>glFinish()</code>.<br>
  But If I instead keep the main thread busy like in a 2 second long while loop, openGl calls won't work (surprisingly the first call to <code>glFinish()</code> would work but the rest won't).
  The documentation says that <code>glFinish</code> should block the thread until the gl commands are executed.
  Can anybody please help me understand what is going on here or provide a solution to this problem.
  To make it clear, I want to present 200 frames one after another without missing a frame and marking each frame refresh by writing to a digital IO port (I don't have a problem with this) all on Snow Leopard. </p>