[Webkit-unassigned] [Bug 50825] GeolocationPositionCache should do database access on background thread

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 20 06:27:14 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=50825





--- Comment #3 from Steve Block <steveblock at google.com>  2010-12-20 06:27:14 PST ---
> no newline
Will do

> This one line is doing a lot.  Maybe the ++numUsers should stay outside of the if statement?
Will do

> Is there any other thread we can share?  Or will this be used for anything else?
I don't have any plans to use this thread for anything else. Is there a precedent for using a thread for multiple tasks? Do you have a suggestion as to which thread I could use.

> I don't think we typically use /* style comments.
Will do

> Everything in this can block the main thread.
> Only lock to get a snapshot.  Don't hold it.  Otherwise, there's no point...
The reason I lock early is that I also need to protect access to m_databaseFile (I admit my mutex is badly named). There's still benefit, as the WebCore thread can now treat this as a 'fire and forget' operation. It's unlikely that the DB thread will be in the middle of a read/write when the WebCore thread next asks for the cached position.

One solution would be to use multiple mutexes and use finer grained locking, but that adds more complexity. WDYT?

-- 
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