Skip to content

Commit 3eb0461

Browse files
committed
chore: fix comment on Acquire
1 parent 232c72f commit 3eb0461

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
@@ -57,7 +57,8 @@ type fetcher func(context.Context, uuid.UUID) (fs.FS, error)
5757
// calls for the same fileID will only result in one fetch, and that parallel
5858
// calls for distinct fileIDs will fetch in parallel.
5959
//
60-
// Every call to Acquire must have a matching call to Release.
60+
// Safety: Every call to Acquire that does not return an error must have a
61+
// matching call to Release.
6162
func (c *Cache) Acquire(ctx context.Context, fileID uuid.UUID) (fs.FS, error) {
6263
// It's important that this `Load` call occurs outside of `prepare`, after the
6364
// mutex has been released, or we would continue to hold the lock until the

0 commit comments

Comments
 (0)