Dedicated thread for Bluetooth processing
Dedicated thread for Bluetooth processing
- Subject: Dedicated thread for Bluetooth processing
- From: Tim Hewett <email@hidden>
- Date: Thu, 4 Oct 2007 02:36:29 +0100
I'm trying to create a dedicated thread to handle all my server's
Bluetooth sending and receiving separately from the main thread of
the Cocoa app. In certain modes it will be a realtime thread as it
must process frames as soon as received, and it must be in a separate
thread from things like window and menu drawing etc. otherwise it
gets delayed.
I've tried detaching a new thread using NSThread
detachNewThreadSelector and had hoped that with all Bluetooth setup
being done in that thread, i.e. publishing the service, registering
for incoming connections etc. (all done using the IOBluetooth
ObjectiveC rather than C function interface) would mean that
notification and delegate methods would also be called in the context
of that thread and its run loop. However they are executed in the
context of the app's main thread and run loop, not what I want.
I sense the answer is simple and assure you I've RTFM from top to
bottom... Is it possible to achieve what I'm looking to do?
Tim.
_______________________________________________
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