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

Method Fire

internal/grpcsync/event.go:37–43  ·  internal/grpcsync/event.go::Event.Fire

Fire causes e to complete. It is safe to call multiple times, and concurrently. It returns true iff this call to Fire caused the signaling channel returned by Done to close. If Fire returns false, it is possible the Done channel has not been closed yet.

()

Source from the content-addressed store, hash-verified

35// channel returned by Done to close. If Fire returns false, it is possible
36// the Done channel has not been closed yet.
37func (e *Event) Fire() bool {
38 if e.fired.CompareAndSwap(false, true) {
39 close(e.c)
40 return true
41 }
42 return false
43}
44
45// Done returns a channel that will be closed when Fire is called.
46func (e *Event) Done() <-chan struct{} {

Calls

no outgoing calls