Skip to content

Commit dd27a28

Browse files
authored
chore: fix comment on Acquire (#18313)
1 parent fb63c94 commit dd27a28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

coderd/files/cache.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ type fetcher func(context.Context, uuid.UUID) (cacheEntryValue, error)
134134
// calls for the same fileID will only result in one fetch, and that parallel
135135
// calls for distinct fileIDs will fetch in parallel.
136136
//
137-
// Every call to Acquire must have a matching call to Release.
137+
// Safety: Every call to Acquire that does not return an error must have a
138+
// matching call to Release.
138139
func (c *Cache) Acquire(ctx context.Context, fileID uuid.UUID) (fs.FS, error) {
139140
// It's important that this `Load` call occurs outside of `prepare`, after the
140141
// mutex has been released, or we would continue to hold the lock until the

0 commit comments

Comments
 (0)