RE: CoreBluetooth, main thread
RE: CoreBluetooth, main thread
- Subject: RE: CoreBluetooth, main thread
- From: Joakim Fernstad <email@hidden>
- Date: Tue, 11 Jun 2013 18:46:14 +0000
- Thread-topic: CoreBluetooth, main thread
Thanks for pointing that out.
It seems I need to read my own code more carefully as well. Found this comment.
m_centralManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil]; // TODO: Set queue to not be on main thread?
Thanks,
Joakim
From: Jason Conn [mailto:email@hidden]
Sent: Tuesday, June 11, 2013 9:47 AM
To: Joakim Fernstad
Cc: <email@hidden>
Subject: Re: CoreBluetooth, main thread
initWithDelegate:queue:
Initializes the central manager with a specified delegate and dispatch queue.
- (id)initWithDelegate:(id<CBCentralManagerDelegate>)delegate queue:(dispatch_queue_t)queue
Parameters
delegate
The delegate to receive the central events.
queue
The dispatch queue to use to dispatch the central role events. If its value is nil ,
the central manager dispatches central role events using the main queue.
Return Value
Returns a newly initialized central manager.
Availability
·
Available in iOS 5.0 and later.
Declared In
CBCentralManager.h
On Jun 11, 2013, at 8:58 AM, Joakim Fernstad <email@hidden> wrote:
The delegates of CoreBluetooth is called on the main thread (at least on iOS).
Does anyone have any insight as to why Apple chose to go this route? Do you know of a way to force the delegates to be called on a different thread?
My problem is that when the user scroll a scroll view, BLE packets are dropped. If anyone has a workaround, I’m all ears.
_______________________________________________
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