Lines Matching refs:myToken
35 int myToken = claimToken(); in startNewSubscription() local
36 VLOG("ShellSubscriber: new subscription %d has come in", myToken); in startNewSubscription()
45 spawnHelperThread(myToken); in startNewSubscription()
46 waitForSubscriptionToEndLocked(mySubscriptionInfo, myToken, lock, timeoutSec); in startNewSubscription()
55 void ShellSubscriber::spawnHelperThread(int myToken) { in spawnHelperThread() argument
56 std::thread t([this, myToken] { pullAndSendHeartbeats(myToken); }); in spawnHelperThread()
61 int myToken, in waitForSubscriptionToEndLocked() argument
65 mSubscriptionShouldEnd.wait_for(lock, timeoutSec * 1s, [this, myToken, &myInfo] { in waitForSubscriptionToEndLocked()
66 return mToken != myToken || !myInfo->mClientAlive; in waitForSubscriptionToEndLocked()
69 mSubscriptionShouldEnd.wait(lock, [this, myToken, &myInfo] { in waitForSubscriptionToEndLocked()
70 return mToken != myToken || !myInfo->mClientAlive; in waitForSubscriptionToEndLocked()
78 int myToken = ++mToken; in claimToken() local
79 return myToken; in claimToken()
127 void ShellSubscriber::pullAndSendHeartbeats(int myToken) { in pullAndSendHeartbeats() argument
128 VLOG("ShellSubscriber: helper thread %d starting", myToken); in pullAndSendHeartbeats()
133 if (!mSubscriptionInfo || mToken != myToken) { in pullAndSendHeartbeats()
134 VLOG("ShellSubscriber: helper thread %d done!", myToken); in pullAndSendHeartbeats()
173 VLOG("ShellSubscriber: helper thread %d sleeping for %lld ms", myToken, in pullAndSendHeartbeats()