Results for “Deferred work & queues”
Small, practical examples. Search by task or narrow things down below.
Explain which ignore rule matches a file
Git: check-ignore -v reports the source file, line, pattern, and matched path.
Git✓ Tested
Find set members missing from another set
Java: Use removeAll on a copy to calculate a set difference.
Java✓ Tested
Find shared set members
Java: Copy a set before retainAll when the original must remain unchanged.
Java✓ Tested
Handle an asynchronous failure
Handle an asynchronous failure with a small React component and explicit browser behavior.
React✓ Tested
Ignore a result after its effect is cleaned up
Ignore a result after its effect is cleaned up with a small React component and explicit browser behavior.
React✓ Tested
Include untracked files in a stash
Git: The include-untracked option saves new files along with tracked edits.
Git✓ Tested
Increment a shared counter atomically
C#: Interlocked performs an indivisible update without a separate lock for this operation.
C#✓ Tested
Initialize a map entry only when absent
Java: Use computeIfAbsent when creating a collection for a new key.
Java✓ Tested
Inject a data loader into a component
Inject a data loader into a component with a small React component and explicit browser behavior.
React✓ Tested
Inspect a parsed URI
C#: Use Uri properties instead of splitting URL strings manually.
C#✓ Tested
Inspect which files a stash changes
Git: stash show can report just filenames before applying anything.
Git✓ Tested
Keep only the latest requested result
Keep only the latest requested result with a small React component and explicit browser behavior.
React✓ Tested