[Webkit-unassigned] [Bug 196094] [GTK][WPE] Implement a basic DNS cache

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 20 07:00:51 PDT 2019


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

--- Comment #10 from Patrick Griffis <pgriffis at igalia.com> ---
(In reply to Carlos Garcia Campos from comment #9)
> (In reply to Michael Catanzaro from comment #8)
> > Comment on attachment 372453 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=372453&action=review
> > 
> > I have a question about the threadsafety semantics. I was originally going
> > to ask why you are using a lock in the DNSCache implementation, since I
> > would have expected that would only ever be called from the main thread. But
> > I see that is wrong, because GResolver is a global singleton, and global
> > singletons in GLib are (probably) expected to be threadsafe (even though
> > I've never seen any documentation indicate this clearly). OK then, the
> > DNSCache is used by your WebKitCachedResolver, so makes sense for DNSCache
> > to be threadsafe.
> 
> I have no idea. Patrick's patch was using a lock only to protect the cache
> itself, and that's what I've done here. 
> 

All calls in my impl were directly redirected to the the existing Resolver which was threadsafe. The only thing the cached resolver did was put results in a cache so that had to be threadsafe.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190620/943d830e/attachment.html>


More information about the webkit-unassigned mailing list