mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
chore: fix comment on Acquire
(#18313)
This commit is contained in:
@ -134,7 +134,8 @@ type fetcher func(context.Context, uuid.UUID) (cacheEntryValue, error)
|
||||
// calls for the same fileID will only result in one fetch, and that parallel
|
||||
// calls for distinct fileIDs will fetch in parallel.
|
||||
//
|
||||
// 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
|
||||
// matching call to Release.
|
||||
func (c *Cache) Acquire(ctx context.Context, fileID uuid.UUID) (fs.FS, error) {
|
||||
// It's important that this `Load` call occurs outside of `prepare`, after the
|
||||
// mutex has been released, or we would continue to hold the lock until the
|
||||
|
Reference in New Issue
Block a user