Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
277
func
(m *mu) tryLock() bool {
278
select
{
279
case
m.ch <-
struct
{}{}:
280
return
true
281
default:
282
return
false
283
}
284
}
285
286
func
(m *mu) lock(ctx context.Context) error {
287
select
{
Callers
1
NetConn
Function · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected