• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Drawing with thread, deadlock
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Prev by Date: Re: Rasterizing an NSString to a bitmap
  • Next by Date: Catching all keyDowns and mouseDowns in application
  • Previous by thread: Re: cocoa-dev digest, Vol 2 #4343 - 13 msgs
  • Next by thread: Catching all keyDowns and mouseDowns in application
  • Index(es):
    • Date
    • Thread