MCPcopy Create free account
hub / github.com/ShukeBta/MediaStationGo / Lock

Method Lock

internal/database/sqlite_runtime.go:55–70  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

53}
54
55func (g *sqliteWriteGate) Lock(ctx context.Context) error {
56 select {
57 case g.ch <- struct{}{}:
58 return nil
59 default:
60 }
61 if ctx == nil {
62 ctx = context.Background()
63 }
64 select {
65 case g.ch <- struct{}{}:
66 return nil
67 case <-ctx.Done():
68 return ctx.Err()
69 }
70}
71
72func (g *sqliteWriteGate) Unlock() {
73 select {

Callers 15

cleanupMethod · 0.80
AllowMethod · 0.80
installSQLiteWriteGateFunction · 0.80
cachedResolveMethod · 0.80
beginResolveMethod · 0.80
finishResolveMethod · 0.80
storeResolvedLinkMethod · 0.80
subscriptionStopChannelFunction · 0.80
WaitReadyMethod · 0.80
StopJobMethod · 0.80
TouchJobMethod · 0.80

Calls

no outgoing calls