38257 move thread from td replicator manager to td replicator

How do you feel about creating a CDTReplicator method that calls a
TDReplicator method to check the state of its internal NSThread object?
Would it be useful for other devs to be able to ask if the thread is
running?

Otherwise, I recently read about some ways to make some C-calls to get the
list of currently running threads -- we could take that route.



On Thu, Nov 6, 2014 at 9:13 AM, Mike Rhodes <notifications@github.com>
wrote:

> In ReplicationAcceptance/ReplicationAcceptance/ReplicationAcceptance.m:
>
> > +    NSError *error;
> > +    STAssertTrue([replicator startWithError:&error],
> > +                @"First replicator started with error: %@", error);
> > +    error = nil;
> > +    STAssertTrue([secondReplicator startWithError:&error],
> > +                @"Second replicator started with error: %@", error);
> > +
> > +    while (replicator.isActive || secondReplicator.isActive) {
> > +        [NSThread sleepForTimeInterval:1.0f];
> > +        NSLog(@" 1st replicator -> %@", [CDTReplicator stringForReplicatorState:replicator.state]);
> > +        NSLog(@"    changes Processed: %ld", replicator.changesProcessed);
> > +        NSLog(@" 2nd replicator -> %@", [CDTReplicator stringForReplicatorState:secondReplicator.state]);
> > +        NSLog(@"    changes Processed: %ld", secondReplicator.changesProcessed);
> > +    }
> > +
> > +    STAssertTrue(tester.multiThreaded, @"Delegate didn't find multithreading evidence.");
>
> Is it possible to test the threads exited?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/cloudant/CDTDatastore/pull/82/files#r19958678>.
>