Use ThreadIdentifier instead of thread::this_thread::get_id
Created attachment 322338 [details] Patch
Comment on attachment 322338 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=322338&action=review > Source/WebCore/ChangeLog:8 > + We can use WTF::ThreadIdentifier instead of thread::this_thread::get_id. Can you explain why this is preferable? I assume it is more efficient.
Comment on attachment 322338 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=322338&action=review I'll fix build failure by including <wtf/Threading.h> >> Source/WebCore/ChangeLog:8 >> + We can use WTF::ThreadIdentifier instead of thread::this_thread::get_id. > > Can you explain why this is preferable? I assume it is more efficient. There are two reasons, 1. thread::this_thread::get_id is slower in Windows 2. using ThreadIdentifier is consistent to the other code in WebKit. Other part of WebKit just uses ThreadIdentifier for the exact same purpose (debugging threadID). Only this place uses thread::this_thread::get_id.
Created attachment 322361 [details] Patch
Comment on attachment 322361 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=322361&action=review > Source/WebCore/ChangeLog:8 > + We can use WTF::ThreadIdentifier instead of thread::this_thread::get_id. Please put your more detailed explanation of why in the ChangeLog.
Comment on attachment 322361 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=322361&action=review >> Source/WebCore/ChangeLog:8 >> + We can use WTF::ThreadIdentifier instead of thread::this_thread::get_id. > > Please put your more detailed explanation of why in the ChangeLog. Thanks, I've just added these explanation to this ChangeLog :)
Committed r222719: <http://trac.webkit.org/changeset/222719>
<rdar://problem/34770618>