From 3eb046130b03e45bacfe8559d44763f53f1107c9 Mon Sep 17 00:00:00 2001 From: McKayla Washburn Date: Tue, 10 Jun 2025 18:50:20 +0000 Subject: [PATCH] chore: fix comment on `Acquire` --- coderd/files/cache.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coderd/files/cache.go b/coderd/files/cache.go index 56e9a715de189..dbf7069f9298c 100644 --- a/coderd/files/cache.go +++ b/coderd/files/cache.go @@ -57,7 +57,8 @@ type fetcher func(context.Context, uuid.UUID) (fs.FS, 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 pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy