Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3303)

Issue 129067: 148 - ThreadLocal and Mutex for pthread

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 6 months ago by mfazekas
Modified:
9 years, 6 months ago
Reviewers:
Vlad, florianlink
CC:
Zhanyong Wan, Zhanyong, googletestframework_googlegroups.com
Base URL:
http://googletest.googlecode.com/svn/trunk/
Visibility:
Public.

Patch Set 1 #

Total comments: 16

Patch Set 2 : 148 - ThreadLocal and Mutex for pthread - round2 #

Total comments: 17

Patch Set 3 : 148 - ThreadLocal and Mutex for pthread #

Patch Set 4 : 148 - ThreadLocal and Mutex for pthread #

Total comments: 14

Patch Set 5 : 148 - ThreadLocal and Mutex for pthread #

Total comments: 4

Patch Set 6 : 148 - ThreadLocal and Mutex for pthread #

Total comments: 4

Patch Set 7 : 148 - ThreadLocal and Mutex for pthread #

Patch Set 8 : // The default ThreadLocal constructor requires T to have a default constructor. #

Patch Set 9 : 148 - ThreadLocal and Mutex for pthread #

Patch Set 10 : 148 - ThreadLocal and Mutex for pthread #

Patch Set 11 : 148 - ThreadLocal and Mutex for pthread #

Patch Set 12 : 148 - ThreadLocal and Mutex for pthread #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+542 lines, -22 lines) Patch
M include/gtest/internal/gtest-port.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +107 lines, -4 lines 2 comments Download
M src/gtest-internal-inl.h View 2 3 4 5 6 2 chunks +51 lines, -0 lines 0 comments Download
M src/gtest-port.cc View 1 2 3 4 5 6 2 chunks +118 lines, -0 lines 0 comments Download
M test/gtest-port_test.cc View 2 3 4 5 6 2 chunks +265 lines, -0 lines 1 comment Download
M test/gtest_stress_test.cc View 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M test/gtest_unittest.cc View 1 2 3 4 5 6 2 chunks +0 lines, -18 lines 0 comments Download

Messages

Total messages: 18
mfazekas
http://codereview.appspot.com/129067/diff/1/3 File include/gtest/internal/gtest-port.h (right): http://codereview.appspot.com/129067/diff/1/3#newcode755 Line 755: I'm throwing an exception when the pthread api ...
14 years, 6 months ago (2009-10-14 20:32:49 UTC) #1
florianlink
I found a small race that is probably only relevant for the unit testing. http://codereview.appspot.com/129067/diff/1/4 ...
14 years, 6 months ago (2009-10-15 07:38:20 UTC) #2
mfazekas
http://codereview.appspot.com/129067/diff/1/4 File src/gtest-port.cc (right): http://codereview.appspot.com/129067/diff/1/4#newcode113 Line 113: owner_ = 0; Yes, the owner_ = 0 ...
14 years, 6 months ago (2009-10-15 14:33:07 UTC) #3
Vlad
Hi Miklos, Thanks for the patch. This is a big one! There are some comments ...
14 years, 6 months ago (2009-10-20 22:40:20 UTC) #4
mfazekas
This is a new patch that fixed these issues since the last patch: - uses ...
14 years, 6 months ago (2009-11-01 17:16:28 UTC) #5
Vlad
Hi Miklos, This is shaping up. :-) Here are some more comments. It is desirable ...
14 years, 6 months ago (2009-11-04 10:21:11 UTC) #6
mfazekas
Vlad, See comments inline. I'll move #include <pthread.h> out of gtest-port.h. Miklos http://codereview.appspot.com/129067/diff/4001/5004 File include/gtest/internal/gtest-port.h ...
14 years, 6 months ago (2009-11-04 17:40:45 UTC) #7
Vlad
Miklos, Are your latest changes uploaded here? I don't see the ThreadLocal changes. Thanks, Vlad ...
14 years, 6 months ago (2009-11-05 15:01:24 UTC) #8
mfazekas
Fixes: - fixed potential race using global mutex (wasn't really relevant as this could happen ...
14 years, 6 months ago (2009-11-06 00:53:35 UTC) #9
Vlad
http://codereview.appspot.com/129067/diff/10001/9011 File include/gtest/internal/gtest-port.h (right): http://codereview.appspot.com/129067/diff/10001/9011#newcode757 include/gtest/internal/gtest-port.h:757: class LockGuard { Why have an extra class for ...
14 years, 5 months ago (2009-11-07 21:42:03 UTC) #10
mfazekas
Vlad, Thanks for the comments. I've fixed some of the issues and commented others where ...
14 years, 5 months ago (2009-11-08 22:46:46 UTC) #11
Vlad
Just a couple more things. http://codereview.appspot.com/129067/diff/10008/10009 File test/gtest-port_test.cc (right): http://codereview.appspot.com/129067/diff/10008/10009#newcode770 test/gtest-port_test.cc:770: temp_ = counter_; It ...
14 years, 5 months ago (2009-11-10 03:24:11 UTC) #12
mfazekas
-Small fixes in port_test: i'm using usleep instead of starting/joining a thread for forcing a ...
14 years, 5 months ago (2009-11-12 06:24:51 UTC) #13
Vlad
I think we are almost done here. Once we resolve the last issue I take ...
14 years, 5 months ago (2009-11-15 22:05:56 UTC) #14
mfazekas
It sounds great that we're getting close to the finish. See comments bellow about the ...
14 years, 5 months ago (2009-11-15 23:52:58 UTC) #15
Vlad
You are right, it looks like we can guarantee per-thread object destruction by the time ...
14 years, 5 months ago (2009-11-16 03:21:45 UTC) #16
mfazekas
Changes: - added comment about lifetime of threadlocals - removed ThreadId stuff, modified the test ...
14 years, 5 months ago (2009-11-17 00:08:36 UTC) #17
Vlad
14 years, 5 months ago (2009-11-18 09:32:09 UTC) #18
Hi Miklos,

Cool, we are there. :-) I'll update it to conform to the style guide now and
commit into svn. It may take some time; I will let you know when it's in.

Cheers,
Vlad

http://codereview.appspot.com/129067/diff/13024/11038
File include/gtest/internal/gtest-port.h (right):

http://codereview.appspot.com/129067/diff/13024/11038#newcode809
include/gtest/internal/gtest-port.h:809: // not alive. The managed object will
exist no longer then the ThreadLocal
On 2009/11/17 00:08:36, mfazekas wrote:
> I've inserted a not here, as the original was - "unless the ThreadLocal
managing
> is alive"

Cool, thanks.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b