DescriptionUse 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 : '' #Messages
Total messages: 8 (0 generated)
|