Results for “Deferred work & queues”
Small, practical examples. Search by task or narrow things down below.
Keep scratch data only for the container lifetime
Docker / Compose: Separate tmpfs mounts do not share data between container runs.
Docker / Compose✓ Tested
Label a volume with its purpose
Docker / Compose: Volume labels support explicit ownership and selection.
Docker / Compose✓ Tested
Limit concurrent access with SemaphoreSlim
C#: Release the semaphore in finally so exceptions cannot leave it permanently acquired.
C#✓ Tested
List files tracked by Git
Git: ls-files reads the index instead of listing every file in the working directory.
Git✓ Tested
List ignored untracked files
Git: Combine ignored with others so the result is specifically ignored working files.
Git✓ Tested
List newly added staged files only
Git: Filter the cached diff by added status while leaving modified files out.
Git✓ Tested
List only staged filenames
Git: The cached diff compares the index with HEAD rather than comparing working files with the index.
Git✓ Tested
List only volumes matching a label
Docker / Compose: A label filter avoids relying on broad name patterns.
Docker / Compose✓ Tested
List untracked files while honoring ignore rules
Git: Use others and exclude-standard together to respect repository and global ignore configuration.
Git✓ Tested
Locate a value in a sorted array
Java: Use Arrays.binarySearch only after establishing ascending order.
Java✓ Tested
Observe cancellation through a token
C#: A cancellation token is cooperative; operations must check it or accept it as an argument.
C#✓ Tested
Offer a retry after a failed attempt
Offer a retry after a failed attempt with a small React component and explicit browser behavior.
React✓ Tested