• 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
When rabid threads have to be put to sleep...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

When rabid threads have to be put to sleep...


  • Subject: When rabid threads have to be put to sleep...
  • From: Lloyd Sargent <email@hidden>
  • Date: Tue, 17 Jul 2001 20:07:15 -0500

Hey y'all,

I've been using the following code fragment to put a thread to sleep:

[NSThread sleepUntilDate:[[NSDate date] addTimeInterval: 1.00 * rcnt]];

It seems to be the simplest way of putting a thread to sleep for a specific period of time... unless I have missed something more obvious. But only recently have I been worried that I have been missing something. If I gather correctly, everything is NSDate comes back as an autoreleased object - so I shouldn't have anything dangling. It just seems so... odd.

Cheers,

Lloyd
-----
Canna Software Development
"No animals were harmed in the creation of this email, however some routers suffered painful bumps and bruises."


OS X Release Version - As Good As It Gets!


  • Prev by Date: Re: Native Java (was Re: Learning Cocoa ..).
  • Next by Date: Re: Native Java (was Re: Learning Cocoa ..).
  • Previous by thread: Re: My Several posts on dealloc/cleanup by framework - Summary & Thanks (was: Collection of Cocoa & objc etc.
  • Next by thread: catching an option-return
  • Index(es):
    • Date
    • Thread