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

Issue 1309563004: On Windows, set current thread in TLS to NULL before deleting the thread. (Closed)

Created:
5 years, 4 months ago by koda
Modified:
5 years, 4 months ago
Reviewers:
Cutch, Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

On Windows, set current thread in TLS to NULL before deleting the thread. This mimics the behavior of the pthreads destructor protocol: "At thread exit, if a key value has a non-NULL destructor pointer, and the thread has a non-NULL value associated with that key, the value of the key is set to NULL, and then the function pointed to is called with the previously associated value as its sole argument." BUG= R=iposva@google.com Committed: https://github.com/dart-lang/sdk/commit/44d4d84be8d53d4b108b06bf11cadb23d5ff528f

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M runtime/vm/thread.cc View 1 chunk +1 line, -1 line 2 comments Download

Messages

Total messages: 6 (1 generated)
koda
This avoids having a small window where Thread::Current returns a dangling pointer, and makes Windows ...
5 years, 4 months ago (2015-08-21 02:36:41 UTC) #2
Ivan Posva
https://codereview.chromium.org/1309563004/diff/1/runtime/vm/thread.cc File runtime/vm/thread.cc (right): https://codereview.chromium.org/1309563004/diff/1/runtime/vm/thread.cc#newcode97 runtime/vm/thread.cc:97: delete current; Are we sure the destructor will not ...
5 years, 4 months ago (2015-08-21 03:23:56 UTC) #3
koda
https://codereview.chromium.org/1309563004/diff/1/runtime/vm/thread.cc File runtime/vm/thread.cc (right): https://codereview.chromium.org/1309563004/diff/1/runtime/vm/thread.cc#newcode97 runtime/vm/thread.cc:97: delete current; On 2015/08/21 03:23:56, Ivan Posva wrote: > ...
5 years, 4 months ago (2015-08-21 17:15:42 UTC) #4
Ivan Posva
LGTM -ip
5 years, 4 months ago (2015-08-25 22:32:43 UTC) #5
koda
5 years, 4 months ago (2015-08-25 22:34:56 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
44d4d84be8d53d4b108b06bf11cadb23d5ff528f (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698