MCPcopy
hub / github.com/grpc/grpc-go / UnsafeSetNotIdle

Method UnsafeSetNotIdle

internal/idle/idle.go:250–257  ·  view source on GitHub ↗

UnsafeSetNotIdle instructs the Manager to update its internal state to reflect the reality that the channel is no longer in IDLE mode. N.B. This method is intended only for internal use by the gRPC client when it exits IDLE mode **manually** from `Dial`. The callsite must ensure: - The channel was

()

Source from the content-addressed store, hash-verified

248// - There is **no concurrent activity** that could cause the channel to exit
249// IDLE mode *naturally* at the same time.
250func (m *Manager) UnsafeSetNotIdle() {
251 m.idleMu.Lock()
252 defer m.idleMu.Unlock()
253
254 atomic.AddInt32(&m.activeCallsCount, math.MaxInt32)
255 m.actuallyIdle = false
256 m.resetIdleTimerLocked(m.timeout)
257}
258
259// OnCallEnd is invoked at the end of every RPC.
260func (m *Manager) OnCallEnd() {

Callers 1

DialContextFunction · 0.80

Calls 3

resetIdleTimerLockedMethod · 0.95
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected