MCPcopy Index your code
hub / github.com/coder/websocket / tryLock

Method tryLock

conn.go:277–284  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

275}
276
277func (m *mu) tryLock() bool {
278 select {
279 case m.ch <- struct{}{}:
280 return true
281 default:
282 return false
283 }
284}
285
286func (m *mu) lock(ctx context.Context) error {
287 select {

Callers 1

NetConnFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected