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

Issue 214033: Use chrome/base synchronization primitives and threads instead of... (Closed)

Created:
11 years, 3 months ago by tim (not reviewing)
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, ncarter (slow), idana, Ben Goodger (Google), tim (not reviewing), Paweł Hajdan Jr.
Visibility:
Public.

Description

Use chrome/base synchronization primitives and threads instead of pthreads in SyncerThread. The old pthread impl can be used by specifying --syncer-thread-pthreads for comparison until we settle fully on the final impl (I have a MessageLoop-based impl in progress). The default SyncerThread is as close to the pthreads-impl semantics as I could get, with one exception: it does not offer a time-out when calling Stop(), because it greatly simplifies the implementation. I first implemented it *with* the timeout, and for sake of experimentation while this is in shuffle I am checking it in as SyncerThreadTimedStop, available by using --syncer-thread-timed-stop. I'm not sure which we want ultimately, but it's useful to have around when building the MessageLoop based impl. I had to refactor the interface slightly to allow multiple implementations, I think it will be quite useful while working on the MessageLoop impl. Added several tests to SyncerThreadUnittest, which all impls now pass ( just pass the command line flag to try each out). TEST=SyncerThreadTest, SyncerThreadWithSyncerTest, integration tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=27117

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 77

Patch Set 3 : '' #

Total comments: 4

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+861 lines, -1058 lines) Patch
M chrome/browser/sync/engine/syncapi.cc View 1 2 3 4 3 chunks +7 lines, -6 lines 0 comments Download
R chrome/browser/sync/engine/syncer_thread.h View 1 2 3 9 chunks +122 lines, -68 lines 0 comments Download
R chrome/browser/sync/engine/syncer_thread.cc View 1 2 3 4 5 6 16 chunks +210 lines, -120 lines 0 comments Download
A + chrome/browser/sync/engine/syncer_thread_pthreads.h View 1 2 7 chunks +95 lines, -42 lines 0 comments Download
A + chrome/browser/sync/engine/syncer_thread_pthreads.cc View 1 2 24 chunks +65 lines, -46 lines 0 comments Download
A + chrome/browser/sync/engine/syncer_thread_timed_stop.h View 1 2 1 chunk +26 lines, -204 lines 0 comments Download
A + chrome/browser/sync/engine/syncer_thread_timed_stop.cc View 1 2 2 chunks +67 lines, -507 lines 0 comments Download
M chrome/browser/sync/engine/syncer_thread_unittest.cc View 1 2 3 4 18 chunks +188 lines, -56 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/test/sync/engine/mock_server_connection.h View 1 2 3 4 3 chunks +8 lines, -1 line 0 comments Download
M chrome/test/sync/engine/mock_server_connection.cc View 1 2 3 4 5 chunks +18 lines, -4 lines 0 comments Download
M chrome/test/sync/engine/test_directory_setter_upper.h View 1 2 3 4 2 chunks +19 lines, -3 lines 0 comments Download
M chrome/test/sync/engine/test_directory_setter_upper.cc View 1 2 3 4 2 chunks +19 lines, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
tim (not reviewing)
The critical part of this change is the part with the least diffs, in syncer_thread.cc, ...
11 years, 3 months ago (2009-09-21 05:42:47 UTC) #1
jar (doing other things)
IMO, I'm a poor choice for reviewing this code, as I have no familiarity with ...
11 years, 3 months ago (2009-09-22 01:12:32 UTC) #2
chron_chromium.org
http://codereview.chromium.org/214033/diff/1021/1031 File chrome/browser/sync/engine/syncer_thread.cc (right): http://codereview.chromium.org/214033/diff/1021/1031#newcode244 Line 244: LOG(INFO) << "Setting stop_syncer_thread_ to true."; Maybe make ...
11 years, 3 months ago (2009-09-22 01:13:16 UTC) #3
tim (not reviewing)
Thank you for detailed reviews (I had only made chron@ the reviewer and cc'ed jar, ...
11 years, 3 months ago (2009-09-22 03:08:43 UTC) #4
tim (not reviewing)
http://codereview.chromium.org/214033/diff/1021/1031 File chrome/browser/sync/engine/syncer_thread.cc (right): http://codereview.chromium.org/214033/diff/1021/1031#newcode143 Line 143: syncer_(NULL), syncer_events_(NULL), thread_("SyncEngine_SyncerThread"), On 2009/09/22 01:12:32, jar wrote: ...
11 years, 3 months ago (2009-09-22 22:48:02 UTC) #5
chron_chromium.org
http://codereview.chromium.org/214033/diff/4001/4011 File chrome/browser/sync/engine/syncer_thread.cc (right): http://codereview.chromium.org/214033/diff/4001/4011#newcode318 Line 318: // The Wait()s in these control field conditionals ...
11 years, 3 months ago (2009-09-23 19:26:53 UTC) #6
tim (not reviewing)
http://codereview.chromium.org/214033/diff/4001/4011 File chrome/browser/sync/engine/syncer_thread.cc (right): http://codereview.chromium.org/214033/diff/4001/4011#newcode318 Line 318: // The Wait()s in these control field conditionals ...
11 years, 3 months ago (2009-09-23 20:41:40 UTC) #7
chron_chromium.org
11 years, 3 months ago (2009-09-23 20:44:54 UTC) #8
lgtm

Powered by Google App Engine
This is Rietveld 408576698