Drawing with thread, deadlock
Drawing with thread, deadlock
- Subject: Drawing with thread, deadlock
- From: "Mark's Studio" <email@hidden>
- Date: Fri, 11 Jun 2004 09:35:44 +0200
I have a NSOpenGLView that draw from a thread
- (void)draw
{
if([self lockFocusIfCanDraw]){
[[self openGLContext] makeCurrentContext];
Drawing.....
glFinish();
[[NSOpenGLContext currentContext] flushBuffer];
[self unlockFocus];
}
}
- (void)drawRect:(NSRect)aRect
{
[self draw];
}
Sometimes i get a deadlock
[NSViewHierarchyLock lockForWriting]
what is the right way to implement this without a deadlock,
and not getting a panic if i don't use any lock's?
Peter Mark
Mark's Recording Studio A/S
Lundeskovsvej 3
2900 Hellerup
Denmark
Tel: +45 35366078 Fax: +45 35366038
www.marks-studio.dk
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.