MCPcopy
hub / github.com/gopherdata/gophernotes / RunWithSocket

Method RunWithSocket

kernel.go:112–116  ·  view source on GitHub ↗

RunWithSocket invokes the `run` function after acquiring the `Socket.Lock` and releases the lock when done.

(run func(socket zmq4.Socket) error)

Source from the content-addressed store, hash-verified

110
111// RunWithSocket invokes the `run` function after acquiring the `Socket.Lock` and releases the lock when done.
112func (s *Socket) RunWithSocket(run func(socket zmq4.Socket) error) error {
113 s.Lock.Lock()
114 defer s.Lock.Unlock()
115 return run(s.Socket)
116}
117
118type Kernel struct {
119 ir *interp.Interp

Callers 3

startHeartbeatFunction · 0.80
PublishMethod · 0.80
ReplyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected