We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
Acquire
1 parentfb63c94 commitdd27a28Copy full SHA for dd27a28
coderd/files/cache.go
@@ -134,7 +134,8 @@ type fetcher func(context.Context, uuid.UUID) (cacheEntryValue, error)
134
// calls for the same fileID will only result in one fetch, and that parallel
135
// calls for distinct fileIDs will fetch in parallel.
136
//
137
-// Every call to Acquire must have a matching call to Release.
+// Safety: Every call to Acquire that does not return an error must have a
138
+// matching call to Release.
139
func (c*Cache)Acquire(ctx context.Context,fileID uuid.UUID) (fs.FS,error) {
140
// It's important that this `Load` call occurs outside of `prepare`, after the
141
// mutex has been released, or we would continue to hold the lock until the