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

Method TrySchedule

internal/grpcsync/callback_serializer.go:63–65  ·  view source on GitHub ↗

TrySchedule tries to schedule the provided callback function f to be executed in the order it was added. This is a best-effort operation. If the context passed to NewCallbackSerializer was canceled before this method is called, the callback will not be scheduled. Callbacks are expected to honor the

(f func(ctx context.Context))

Source from the content-addressed store, hash-verified

61// Callbacks are expected to honor the context when performing any blocking
62// operations, and should return early when the context is canceled.
63func (cs *CallbackSerializer) TrySchedule(f func(ctx context.Context)) {
64 cs.callbacks.Put(f)
65}
66
67// ScheduleOr schedules the provided callback function f to be executed in the
68// order it was added. If the context passed to NewCallbackSerializer has been

Callers 13

startMethod · 0.45
resolveNowMethod · 0.45
closeMethod · 0.45
resolverErrorMethod · 0.45
closeMethod · 0.45
exitIdleMethod · 0.45
updateStateMethod · 0.45
SubscribeMethod · 0.45

Calls 1

PutMethod · 0.65