Re: IOBluetoothUI thread safe?
Re: IOBluetoothUI thread safe?
- Subject: Re: IOBluetoothUI thread safe?
- From: Eric Brown <email@hidden>
- Date: Fri, 7 Oct 2005 13:00:04 -0700
IOBluetoothUI is not thread safe. It uses both IOBluetooth and
AppKit of which neither are thread safe. Your best bet is to use the
main thread as your Bluetooth thread and enqueue any Bluetooth
operations to be performed on it. Not ideal, but it should work for
you.
- Eric
On Oct 7, 2005, at 11:52 AM, Joseph Kelly wrote:
Background: To operate within my own specific requirements that I
need to kick off a bunch of bluetooth operations from any thread
(including the main thread) AND also operate within the IOBluetooth
requirement that all operations be performed on a same thread, I've
spawned a worker thread that handles all bluetooth operations (it
gets awakened whenever there are commands placed in a queue and
performs the bluetooth operations asynchronously, while the
requesting threads are blocked until completion).
So, is it safe or even advisable to call into IOBluetoothUI from
this worker thread? My wish is to put up the standard bluetooth
discovery dialog to let the user choose which device to connect to.
The standard wisdom is never run UI from a non-main thread, but I
might not have a choice?
joe
_______________________________________________
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
_______________________________________________
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