Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Issue 9059: Use CreateThread instead of _beginthreadex. This should still be safe, and w... (Closed)

Created:
12 years, 1 month ago by Dean McNamee
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Use CreateThread instead of _beginthreadex. This should still be safe, and we'll see if it makes a noticable impact on startup time. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=4580

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -4 lines) Patch
M base/platform_thread_win.cc View 3 chunks +9 lines, -4 lines 4 comments Download

Messages

Total messages: 7 (0 generated)
Dean McNamee
From my traces, looks like it helps.
12 years, 1 month ago (2008-11-03 22:05:04 UTC) #1
Peter Kasting
http://codereview.chromium.org/9059/diff/1/2 File base/platform_thread_win.cc (right): http://codereview.chromium.org/9059/diff/1/2#newcode53 Line 53: if (0 && !::IsDebuggerPresent()) Did you mean this ...
12 years, 1 month ago (2008-11-03 22:09:29 UTC) #2
darin (slow to review)
LGTM w/ the bogus if (0) removed.
12 years, 1 month ago (2008-11-03 22:18:33 UTC) #3
M-A Ruel
If we ever see glitches, it's relatively easy to roll back. lgtm http://codereview.chromium.org/9059/diff/1/2 File base/platform_thread_win.cc ...
12 years, 1 month ago (2008-11-03 22:22:11 UTC) #4
cpu_(ooo_6.6-7.5)
The full source code to _beginthreadex is here: C:\Program Files\Microsoft Visual Studio 8\VC\crt\src\threadex.c It seems ...
12 years, 1 month ago (2008-11-04 03:07:58 UTC) #5
rtanabe999
A thread in an executable that calls the C run-time library (CRT) should use the ...
12 years, 1 month ago (2008-11-04 08:29:10 UTC) #6
tommi (sloooow) - chröme
12 years ago (2008-11-30 05:29:32 UTC) #7
http://codereview.chromium.org/9059/diff/1/2
File base/platform_thread_win.cc (right):

http://codereview.chromium.org/9059/diff/1/2#newcode80
Line 80: // faster and doesn't require holding the loader lock.  Our code will
have
hi... really late, drive by comment here.  I noticed this line "doesn't require
holding the loader lock" for CreateThread. Actually even with CreateThread when
a thread starts, it does acquire the loader lock in order to call
DllMain(DLL_THREAD_ATTACH) for all dlls that haven't opted out of those calls.
just an fyi.
the _beginthreadex() call adds a crt thread stub that sets up TLS stuff.  I
doubt that chrome depends on it though, so the change is fine by me.  Just an
fyi on the comment in the code.

Powered by Google App Engine
This is Rietveld 408576698