[Webkit-unassigned] [Bug 29115] Allow multiple read transactions to run concurrently on the same DB thread
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 16 19:46:09 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=29115
--- Comment #2 from Michael Nordman <michaeln at google.com> 2009-09-16 19:46:05 PDT ---
> m_pendingTransactions.add(dbIdentifier, pendingTransactions);
> it = m_pendingTransactions.find(dbIdentifier);
Looks like map.add() will return an iterator for you. So you don't have to call
find() again.
// does nothing if key is already present
// return value is a pair of the iterator to the key location,
// and a boolean that's true if a new value was actually added
pair<iterator, bool> add(const KeyType&, const MappedType&);
> while ((pt_it->get() != transaction) && (pt_it->get()->isReadOnly()) && (++pt_it, 1));
> ASSERT(pt_it->get() == transaction);
Since the iteration can't fail to find your transaction, according to the
ASSERT, I don't think you need to test for end() in your while loop. Also, that
while loop is a bit much to parse... (hmmm, what does (foo, 1) mean :)
while ((pt_it->get() != transaction) && pt_it->get()->isReadOnly())
++pt_it
The logic looks good to me.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list