[Webkit-unassigned] [Bug 187984] [Curl] Use shared single thread for WebSocket connections

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 11 19:11:58 PST 2020


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

--- Comment #35 from Fujii Hironori <Hironori.Fujii at sony.com> ---
Comment on attachment 389797
  --> https://bugs.webkit.org/attachment.cgi?id=389797
Handling connections by one thread.

View in context: https://bugs.webkit.org/attachment.cgi?id=389797&action=review

>>>> Source/WebCore/platform/network/curl/CurlStreamScheduler.h:64
>>>> +    HashMap<CurlStreamID, std::unique_ptr<CurlStream>> m_streamLists;
>>> 
>>> If HashMap is the concern because of the cost, we can switch to StdMap. If that's not enough, use Vector<std::tuple<CurlStreamID, CurlStream::Client*>>.
>> 
>> Why do you prefer the inefficient approach? m_streamLists simply can be removed.
> 
> Can you provide how to do that? We need bi-directional reference from Client to Stream and Stream to Client. I don't understand what you are proposing.

By having an internal discussion, I understand why the raw address of SocketStreamHandleImpl can't be use as the ID.
But, I still think using WeakPtr or making SocketStreamHandleImpl ThreadSafeRefCounted is better than using double HashMap.
Do you know WeakPtrImpl is a ThreadSafeRefCounted<WeakPtrImpl>? it can be safely increment the ref-counter in the worker thread.
Anyway, you are the curl port architecture, I buy your architectural decision.

-- 
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/20200212/6a441975/attachment.htm>


More information about the webkit-unassigned mailing list