// IsAutoSync returns the value of autosync
485178
func IsAutoSync(ctx context.Context) bool {
	bv, ok := ctx.Value(ctxKeyAutoSync).(bool)
	if !ok {
		return true
	}
	return bv
}
1016810
func (p *Protocol) isActiveAsymKey(key string, topic Topic) bool {
	return p.pubKeyRWPool[key] != nil
}
1220342
func IsAutoPrint(ctx context.Context) bool {
	bv, ok := ctx.Value(ctxKeyAutoPrint).(bool)
	if !ok {
		return false
	}
	return bv
}
440686
func (a *btcAddress) SyncStatus() SyncStatus {
	switch {
	case a.flags.unsynced && !a.flags.partialSync:
		return Unsynced(a.firstBlock)
	case a.flags.unsynced && a.flags.partialSync:
		return PartialSync(a.partialSyncHeight)
	default:
		return FullSync{}
	}
}
1186828
func isAtomic(req *http.Request) (bool, error) {
	// "transaction" is checked for backwards compatibility with
	// client libraries.
	for _, q := range []string{"atomic", "transaction"} {
		if a, err := queryParam(req, q); err != nil || a {
			return a, err
		}
	}
	return false, nil
}
991813
func (k *SimpleFS) SimpleFSSyncStatus(ctx context.Context, filter keybase1.ListFilter) (keybase1.FSSyncStatus, error) {
	ctx, cancel := context.WithTimeout(
		k.makeContext(ctx), simpleFSFastActionTimeout)
	defer cancel()
	jManager, jErr := libkbfs.GetJournalManager(k.config)
	if jErr != nil {
		k.log.CDebugf(ctx, "Journal not enabled; sending empty response")
		return keybase1.FSSyncStatus{}, nil
	}
	status, tlfIDs := jManager.Status(ctx)
	err := libkbfs.FillInJournalStatusUnflushedPaths(
		ctx, k.config, &status, tlfIDs)
	if err != nil {
		k.log.CDebugf(ctx, "Error setting unflushed paths: %+v; "+
			"sending empty response", err)
		return keybase1.FSSyncStatus{}, nil
	}

	var syncingPaths []string
	if filter == keybase1.ListFilter_NO_FILTER {
		syncingPaths = status.UnflushedPaths
	} else {
		for _, p := range status.UnflushedPaths {
			if isFiltered(filter, p) {
				continue
			}
			syncingPaths = append(syncingPaths, p)
		}
	}

	k.log.CDebugf(ctx, "Sending sync status response with %d syncing bytes",
		status.UnflushedBytes)
	return keybase1.FSSyncStatus{
		TotalSyncingBytes: status.UnflushedBytes,
		SyncingPaths:      syncingPaths,
		EndEstimate:       keybase1.ToTimePtr(status.EndEstimate),
	}, nil
}
131417
func (c *Client) allocSync() {
	staggered := false
	syncTicker := time.NewTicker(allocSyncIntv)
	updates := make(map[string]*structs.Allocation)
	for {
		select {
		case <-c.shutdownCh:
			syncTicker.Stop()
			return
		case alloc := <-c.allocUpdates:
			// Batch the allocation updates until the timer triggers.
			updates[alloc.ID] = alloc
		case <-syncTicker.C:
			// Fast path if there are no updates
			if len(updates) == 0 {
				continue
			}

			sync := make([]*structs.Allocation, 0, len(updates))
			for _, alloc := range updates {
				sync = append(sync, alloc)
			}

			// Send to server.
			args := structs.AllocUpdateRequest{
				Alloc:        sync,
				WriteRequest: structs.WriteRequest{Region: c.Region()},
			}

			var resp structs.GenericResponse
			if err := c.RPC("Node.UpdateAlloc", &args, &resp); err != nil {
				c.logger.Error("error updating allocations", "error", err)
				syncTicker.Stop()
				syncTicker = time.NewTicker(c.retryIntv(allocSyncRetryIntv))
				staggered = true
			} else {
				updates = make(map[string]*structs.Allocation)
				if staggered {
					syncTicker.Stop()
					syncTicker = time.NewTicker(allocSyncIntv)
					staggered = false
				}
			}
		}
	}
}
303931
func (k KeybaseServiceMeasured) NotifyOverallSyncStatus(
	ctx context.Context, status keybase1.FolderSyncStatus) (err error) {
	k.notifyTimer.Time(func() {
		err = k.delegate.NotifyOverallSyncStatus(ctx, status)
	})
	return err
}
292174
func (exp *explorerUI) ShowingSyncStatusPage() bool {
	display, ok := exp.displaySyncStatusPage.Load().(bool)
	return ok && display
}
372299
func (t *Track) IsAutoLinked() bool {
	linked := C.sp_track_is_autolinked(
		t.session.sp_session,
		t.sp_track,
	)
	return linked == 1
}
1215847
func (db *GoLevelDB) DeleteSync(key []byte) {
	key = nonNilBytes(key)
	err := db.db.Delete(key, &opt.WriteOptions{Sync: true})
	if err != nil {
		cmn.PanicCrisis(err)
	}
}
1289167
func (m *activeDeadlineHandler) ShouldSync(pod *v1.Pod) bool {
	return m.pastActiveDeadline(pod)
}
14868
func (wsh *WebsocketHub) AreDBsSyncing() bool {
	syncing, ok := wsh.dbsSyncing.Load().(bool)
	return ok && syncing
}
763200
func (c *Client) IsConnected() bool {
	c.RLock()
	defer c.RUnlock()
	switch {
	case c.status == connected:
		return true
	case c.options.AutoReconnect && c.status > disconnected:
		return true
	default:
		return false
	}
}
1029535
func (qm *QuotaMonitor) IsSynced() bool {
	qm.monitorLock.RLock()
	defer qm.monitorLock.RUnlock()

	if len(qm.monitors) == 0 {
		klog.V(4).Info("quota monitor not synced: no monitors")
		return false
	}

	for resource, monitor := range qm.monitors {
		if !monitor.controller.HasSynced() {
			klog.V(4).Infof("quota monitor not synced: %v", resource)
			return false
		}
	}
	return true
}
1011130
func (t *TCB) IsAlive() bool {
	return !t.inbound.rstSeen && !t.outbound.rstSeen && (!t.inbound.closed() || !t.outbound.closed())
}
144391
func (em *clientEventMonitor) IsActive() bool {
	em.Lock()
	defer em.Unlock()

	return em.active
}