• 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: Continue application processing with mouse down on a menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Continue application processing with mouse down on a menu


  • Subject: Re: Continue application processing with mouse down on a menu
  • From: Scott Ribe <email@hidden>
  • Date: Sun, 27 Sep 2015 08:44:07 -0600

On Sep 26, 2015, at 12:00 PM, Programmingkid <email@hidden> wrote:
>
> I did try using a separate thread, but that caused part of the application to stop responding to events.

A background thread will *not* cause your application to stop responding to events. You need to go back and look more closely at what was happening there.

Did you block on the main thread waiting for the background thread to finish? Of course waiting in the main thread would stop event processing, so you would need to post an event from the background thread when it is done, not block on the main thread. (Alternatively, you could have the main thread somehow check periodically if the bg thread is done, but in most cases calling performSelectorOnMainThread from the bg thread is a very easy way to get results back into the main thread, much easier than having the main thread "poll", and worrying about correct synchronization of that polling.)

--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice






_______________________________________________

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: 
 >Continue application processing with mouse down on a menu (From: Programmingkid <email@hidden>)
 >Re: Continue application processing with mouse down on a menu (From: Jens Alfke <email@hidden>)
 >Re: Continue application processing with mouse down on a menu (From: Eric Schlegel <email@hidden>)
 >Re: Continue application processing with mouse down on a menu (From: Programmingkid <email@hidden>)

  • Prev by Date: Re: Continue application processing with mouse down on a menu
  • Next by Date: Re: -[NSThread start] blocks ?!?
  • Previous by thread: Re: Continue application processing with mouse down on a menu
  • Next by thread: Re: Continue application processing with mouse down on a menu
  • Index(es):
    • Date
    • Thread