• 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
Re: BOOL parameter passed as nil object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BOOL parameter passed as nil object


  • Subject: Re: BOOL parameter passed as nil object
  • From: Ken Thomases <email@hidden>
  • Date: Fri, 22 Apr 2016 20:46:18 -0500

On Apr 22, 2016, at 6:19 PM, Quincey Morris <email@hidden> wrote:
>
> On Apr 22, 2016, at 16:12 , Carl Hoefs <email@hidden> wrote:
>>
>> Yes, CFRunLoopPerformBlock: works well!
>
> But it sounded like you *didn’t* want to prevent the block from running. In that case, dispatch_async would be all you’d need. (AFAIK, it doesn’t interact with run loops, which means the block will always run.)
>
> OTOH, if you were trying to *prevent* your block from running until the run loop exited a mode, then I guess CFRunLoopPerformBlock is what you’d want.

The main dispatch queue is processed in the common run loop modes.  It is not correct that "it doesn’t interact with run loops, which means the block will always run".  If running in the common modes is what you want to achieve, there's no need to use CFRunLoopPerformBlock().  You'd only need to use that if you want it to run in some other mode(s).

Also, if you use CFRunLoopPerformBlock(), you generally want to call CFRunLoopWakeUp() immediately after.  See the docs for the former.

Regards,
Ken


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >BOOL parameter passed as nil object (From: Carl Hoefs <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: Alex Zavatone <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: Jens Alfke <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: Greg Parker <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: Alex Zavatone <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: John McCall <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: Carl Hoefs <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: Quincey Morris <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: Carl Hoefs <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: Clark Cox <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: Carl Hoefs <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: HIThemeGetTextDimensions problems
  • Next by Date: Re: Split view priority
  • Previous by thread: Re: BOOL parameter passed as nil object
  • Next by thread: Re: BOOL parameter passed as nil object
  • Index(es):
    • Date
    • Thread