Results for “async”
Small, practical examples. Search by task or narrow things down below.
Run dependent async steps in order
JavaScript: Await one result before using it as the input of the next calculation.
JavaScript✓ Tested
Run dependent async steps in order
TypeScript: Await one result before using it as the input of the next calculation.
TypeScript✓ Tested
Transform an asynchronous result
Java: Chain thenApply and join a CompletableFuture to retrieve the completed value.
Java✓ Tested
Await multiple tasks while preserving result order
C#: Task.WhenAll returns results in the same order as the supplied tasks.
C#✓ Tested
Await several independent results
Preserve input order while awaiting multiple promises.
Promise.all✓ Tested
Disable an action while it is pending
Disable an action while it is pending with a small React component and explicit browser behavior.
React✓ Tested
Escape a URL query value
C#: EscapeDataString percent-encodes one value rather than an entire URL.
C#✓ Tested
Escape text for an HTML context
C#: HtmlEncode converts markup delimiters in plain text before rendering it as HTML content.
C#✓ 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
Increment a shared counter atomically
C#: Interlocked performs an indivisible update without a separate lock for this operation.
C#✓ 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