Closed Bug 853550 Opened 12 years ago Closed 11 years ago

[Bluetooth] Remove DBus/Bluetooth command thread

Categories

(Firefox OS Graveyard :: Bluetooth, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tzimmermann, Assigned: tzimmermann)

References

Details

Attachments

(3 files)

To simplify the Bluetooth system and save some resources we want to remove the command thread for Bluetooth/DBus. This thread is currently necessary because we have calls to DBus, which we cannot execute from within the main thread because they are blocking. Once bug 830290 landed, we have the infrastructure to convert all remaining blocking DBus calls to asyncronous calls. This will allow us to remove the need for the command thread.
Component: General → Bluetooth
Depends on: 880167
Depends on: 880168
I think that removing the command thread will be a long-term process. Currently, several operations are blocking only. This includes methods outside of the DBus/BlueZ code, such as BluetoothHFPManager::Connect. If we want to convert this code to be non-blocking, we'll need to redesign the way this code works. I think we should start by changing the BlueZ code to be more non-blocking and do most processing in the call back functions of the replies. Once we have this in place we can work 'outwards' to the calling code. This bug should be the meta-bug for all related changes.
Depends on: 884840
Depends on: 891276
Depends on: 891866
Depends on: 892933
Depends on: 892939
Depends on: 902396
Blocks: 909883
I turned Bluetooth on and off several dozen times in a row to test this change.
Attachment #798431 - Flags: review?(kyle)
Attachment #798431 - Flags: review?(kyle) → review+
Attachment #798429 - Flags: review?(echou) → review+
Comment on attachment 798432 [details] [diff] [review] [03] Bug 853550: Replace Bluetooth command thread Review of attachment 798432 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me. Thanks :)
Attachment #798432 - Flags: review?(gyeh) → review+
Comment on attachment 798432 [details] [diff] [review] [03] Bug 853550: Replace Bluetooth command thread Review of attachment 798432 [details] [diff] [review]: ----------------------------------------------------------------- You did it! Thanks for solving a series of bugs and making the codebase cleaner! :)
Attachment #798432 - Flags: review?(echou) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: