Closed
Bug 1100758
Opened 10 years ago
Closed 10 years ago
(ios) Create a general locking api
Categories
(Firefox for iOS :: General, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: wesj, Unassigned)
Details
Attachments
(1 file)
Swift doesn't really have a nice locking API. We should write one. http://www.bignerdranch.com/blog/locking-in-swift-helping-protect-me-from-myself/ has a nice example one.
Reporter | ||
Updated•10 years ago
|
Group: mozilla-employee-confidential
Reporter | ||
Comment 1•10 years ago
|
||
Attachment #8524317 -
Flags: review?(bnicholson)
Comment 2•10 years ago
|
||
I'm not against having this but I think we need to try to avoid using special Locking as much as possible. In general you are either on the Main thread or on the UI thread. Operations should generally happen on the main thread. Or if they can take a while on one of the predefined queues that the system gives us. The main thread executes blocks serially, so if we are consistent and schedule work there, then there should mostly be no need for locking resources.
Comment 3•10 years ago
|
||
Comment on attachment 8524317 [details] [review] Pull request Yeah, Wes and I have been talking about threading in Swift over the past couple days, and I think we agree that we should be breaking up critical sections into tasks that are handed off to GCD. I think we'll be dropping this and updating bug 8524345 to use GCD, so removing review.
Attachment #8524317 -
Flags: review?(bnicholson)
Comment 4•10 years ago
|
||
(In reply to Brian Nicholson (:bnicholson) from comment #3) > I think we'll be dropping this and updating bug 8524345 to use GCD, so > removing review. Oops, I copied the attachment # instead of the bug #. I meant bug 1094317.
Reporter | ||
Comment 5•10 years ago
|
||
I talked to brian about this again today for a bit. I like having a locking API TBH, but I'd like to sit down at the work week and look at other better solutions.
Reporter | ||
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Group: mozilla-employee-confidential
OS: All → iOS 7
Product: Firefox for Android → Firefox for iOS
You need to log in
before you can comment on or make changes to this bug.
Description
•