• 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: Questions about Run Loops
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions about Run Loops


  • Subject: Re: Questions about Run Loops
  • From: Joseph Kelly <email@hidden>
  • Date: Thu, 17 Nov 2005 11:41:23 -0800


On Nov 17, 2005, at 6:37 AM, Geoffrey Schmit wrote:

I've ensured that my framework functions that end up calling into the IOBluetoothUI framework are always called on the application's UI thread.  If I ensure this, what problems would I encounter if I create a thread that is responsible for calling into the IOBluetooth framework and have my other framework functions pass messages to this thread?

I tried that method (IOBluetoothUI on the main thread, and IOBluetooth from other threads) and it was generally unstable --  calls into IOBluetoothUI would occasionally hang or crash (this was on 10.4.2, Xcode 2.2. preview). When I moved all bluetooth api calls into the main thread, and used the provided async calls whenever possible, it all started running much smoother.

In other words, I think IOBluetoothUI relies on objects used by IOBluetooth, and the access is not synchronized. The Apple engineers, who have been very helpful, could probably elaborate.

  If I create a thread using pthreads, will that thread have an associated run loop or do I have to create one explicitly?  The documentation I've read was not clear on this point.

Run loop creation/destruction is handled automatically.

http://developer.apple.com/documentation/CoreFoundation/Reference/CFRunLoopRef/index.html?http://developer.apple.com/documentation/CoreFoundation/Reference/CFRunLoopRef/Reference/reference.html



Thanks for any insight!

geoff

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Questions about Run Loops
      • From: Geoffrey Schmit <email@hidden>
References: 
 >Re: Questions about Run Loops (From: Geoffrey Schmit <email@hidden>)

  • Prev by Date: Re: Questions about Run Loops
  • Next by Date: Re: Questions about Run Loops
  • Previous by thread: Re: Questions about Run Loops
  • Next by thread: Re: Questions about Run Loops
  • Index(es):
    • Date
    • Thread