Closed
Bug 291123
Opened 19 years ago
Closed 19 years ago
remove unused MOZ_THREADSAFE_RDF and locks from nsInMemoryDataSource
Categories
(Core Graveyard :: RDF, defect)
Core Graveyard
RDF
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: axel, Assigned: axel)
References
Details
Attachments
(1 file)
8.83 KB,
patch
|
benjamin
:
review+
brendan
:
superreview+
brendan
:
approval-aviary1.1a1+
brendan
:
approval1.8b2+
|
Details | Diff | Splinter Review |
nsInMemoryDataSource has code fragments that claim to enable multi-threading locks to the datasource. They may even work, but they haven't been tested for years, I didn't even try compiling those. Anyway, the new API design has interfaces like rdfITripleVisitor, http://wiki.mozilla.org/Rdf:Interfaces#rdfITripleVisitor which is called for each arc in the result of a datasource query. We need to protect the datasource from write operations during this operation. In a multithreaded env this is tricky->hard, as a write from a read callback is an error, while a write from a separate thread as a read is just supposed to wait. As we don't use it, I'd like to get rid of it completely, so that we can just error if we write during a read.
Assignee | ||
Comment 1•19 years ago
|
||
Attachment #181288 -
Flags: superreview?(brendan)
Attachment #181288 -
Flags: review?(benjamin)
Comment 2•19 years ago
|
||
Comment on attachment 181288 [details] [diff] [review] remove unused lock code from nsInMemoryDataSource Do you want to remove the "Locked*" function names while you're at it?
Attachment #181288 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 3•19 years ago
|
||
(In reply to comment #2) > Do you want to remove the "Locked*" function names while you're at it? I did think about renaming them to something like InnerAssert or something, but I didn't feel like that is really necessary. I wouldn't remove them, as they are factored out from the Assert, the Move and the Change code.
Comment 4•19 years ago
|
||
Comment on attachment 181288 [details] [diff] [review] remove unused lock code from nsInMemoryDataSource rs=brendan@mozilla.org. /be
Attachment #181288 -
Flags: superreview?(brendan) → superreview+
Assignee | ||
Comment 5•19 years ago
|
||
Comment on attachment 181288 [details] [diff] [review] remove unused lock code from nsInMemoryDataSource requesting approval, this patch is removing code NPOB.
Attachment #181288 -
Flags: approval-aviary1.1a1?
Comment 6•19 years ago
|
||
Comment on attachment 181288 [details] [diff] [review] remove unused lock code from nsInMemoryDataSource Back end code, so 1.8b2+ but I'll throw in aviary1.1a1+ too! /be
Attachment #181288 -
Flags: approval1.8b2+
Attachment #181288 -
Flags: approval-aviary1.1a1?
Attachment #181288 -
Flags: approval-aviary1.1a1+
Comment 7•19 years ago
|
||
Drive by nit: The names "LockedAssert" and "LockedUnassert" seem to have been chosen to reflect the fact that they are called while mLock is held. Since you are removing mLock, shouldn't you change the names of these functions? Maybe "InternalAssert" or something like that would be better?
Assignee | ||
Comment 8•19 years ago
|
||
There are more "drive by" nits to fix in this code, I prefer to land them in a distinct cycle, when I don't have other patches in my trees.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•