All fields

“Async await” in Information Technology

56 questions across 9 technologies.

Information Technology

56 questions in 9 technologies

#QuestionTechnologyTopicLevel
1How do the async and await keywords let you write asynchronous code in Dart that reads and looks like simple, straightforward sequential code? Flutter › Dart Asynchronous Programming (Future & async/await)FlutterDart Asynchronous Programming (Future & async/await)Beginner
2How do you properly handle errors that occur during an asynchronous operation using a try catch block combined with async and await? Flutter › Dart Asynchronous Programming (Future & async/await)FlutterDart Asynchronous Programming (Future & async/await)Intermediate
3How does Future.wait let you run several independent asynchronous operations concurrently and wait for all of them to complete together, rather than awaiting each one sequentially one after another? Flutter › Dart Asynchronous Programming (Future & async/await)FlutterDart Asynchronous Programming (Future & async/await)Intermediate
4What is the difference between running async operations sequentially with multiple awaits versus concurrently with Promise.all()? Node.js › Async PatternsNode.jsAsync PatternsIntermediate
5What is the difference between microtasks and the event queue in Dart's event loop, and how does this affect the precise order in which asynchronous code actually executes? Flutter › Dart Asynchronous Programming (Future & async/await)FlutterDart Asynchronous Programming (Future & async/await)Intermediate
6How can you properly cancel an in progress asynchronous operation in Dart, such as a network request, when it is no longer actually needed, for example because the user has already navigated away from that specific screen? Flutter › Dart Asynchronous Programming (Future & async/await)FlutterDart Asynchronous Programming (Future & async/await)Advanced
7How can improper use of unawaited Futures introduce subtle bugs, such as a race condition or an unhandled error, into a Flutter application, and how does the unawaited function help make this deliberate choice explicit? Flutter › Dart Asynchronous Programming (Future & async/await)FlutterDart Asynchronous Programming (Future & async/await)Advanced
8What do async and await do? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingBeginner
9What do the 'async' and 'await' keywords do, and how do they relate to each other? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingBeginner
10What is the difference between the async and await keywords in C#, and how do they work together? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingBeginner
11How does async/await relate to Promises under the hood, and what does 'await' actually do to program execution? Node.js › Async PatternsNode.jsAsync PatternsIntermediate
12How do IAsyncEnumerable<T> and 'await foreach' let you consume an asynchronous stream of values one at a time? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingAdvanced
13How does async/await work under the hood in C#, and what specifically happens when execution reaches an 'await'? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingAdvanced
14What is an async generator, and how does 'for await...of' let you consume asynchronously produced data? Node.js › Async PatternsNode.jsAsync PatternsAdvanced
15What is a common pitfall when using async/await inside Array.prototype.forEach(), and how do you fix it? Node.js › Async PatternsNode.jsAsync PatternsAdvanced
16How do you loop over an async iterable? JavaScript › Async Iterators & StreamsJavaScriptAsync Iterators & StreamsBeginner
17Why might Promise.all() be the wrong tool when consuming many async iterators? JavaScript › Async Iterators & StreamsJavaScriptAsync Iterators & StreamsAdvanced
18What is a Future in Dart, and how does it represent a value that will not actually be available until some point later in time? Flutter › Dart Asynchronous Programming (Future & async/await)FlutterDart Asynchronous Programming (Future & async/await)Beginner
19How do you catch errors from a Promise chain versus async/await? JavaScript › Error HandlingJavaScriptError HandlingIntermediate
20How does async/await map onto the microtask queue under the hood? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyAdvanced
21How were generators historically used to write asynchronous code before async/await existed? JavaScript › Iterators & GeneratorsJavaScriptIterators & GeneratorsAdvanced
22How can you properly and safely use a BuildContext across an asynchronous gap, such as directly after an await statement, without genuinely risking using a context that has since actually genuinely become invalid because its own underlying widget was already disposed of in the meantime? Flutter › Flutter Widget Tree, Element Tree & BuildContextFlutterFlutter Widget Tree, Element Tree & BuildContextAdvanced
23What does ConfigureAwait(false) do? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingIntermediate
24What are common async/await pitfalls in MAUI? .NET MAUI › Concurrency & Threading.NET MAUIConcurrency & ThreadingIntermediate
25What are common async/await pitfalls in MAUI? .NET MAUI › Concurrency & Threading.NET MAUIConcurrency & ThreadingIntermediate
26What does ConfigureAwait(false) do, and when is it appropriate to use? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingIntermediate
27What is the try/catch/finally pattern's 'finally' block used for, and how does it behave with async/await? Node.js › Error HandlingNode.jsError HandlingIntermediate
28How would you implement a custom EventHandler using async/await, avoiding the common 'async void' anti-pattern while still matching the standard EventHandler delegate signature? C# › Delegates, Events & LambdasC#Delegates, Events & LambdasAdvanced
29How does exception handling interact with async/await, and how are exceptions from an async Task propagated to the awaiting caller? C# › Exception HandlingC#Exception HandlingAdvanced
30How would you combine yield return with async/await to build an IAsyncEnumerable<T>-producing async iterator method? C# › Iterators & yield returnC#Iterators & yield returnAdvanced
31How would you implement a coroutine-style generator-based pipeline (the classic pre-async/await pattern) using multiple chained 'send()'-driven generators? Python › Comprehensions & GeneratorsPythonComprehensions & GeneratorsAdvanced
32How do you write a decorator that works correctly on an async function (coroutine), given that a regular decorator's wrapper would break 'await' usage? Python › DecoratorsPythonDecoratorsAdvanced
33How does async/await performance compare to synchronous code, and what overhead does the async state machine introduce? .NET › Diagnostics & Performance.NETDiagnostics & PerformanceAdvanced
34How does control-flow-based narrowing interact with strictNullChecks across an async function's awaited boundaries? TypeScript › Nullability: strictNullChecks, Optional Chaining & Nullish CoalescingTypeScriptNullability: strictNullChecks, Optional Chaining & Nullish CoalescingAdvanced
35How do you properly handle loading, error, and data states when working with a FutureProvider or a StreamProvider in Riverpod, using the resulting AsyncValue's own convenient when method? Flutter › State Management with RiverpodFlutterState Management with RiverpodIntermediate
36How should you properly and correctly avoid calling setState after a StatefulWidget's own associated State object has genuinely already been disposed of, such as after an asynchronous operation genuinely completes following a user having already navigated away? Flutter › State Management with setStateFlutterState Management with setStateIntermediate
37How do you write an effective test for asynchronous code? JavaScript › Debugging, Testing & ToolingJavaScriptDebugging, Testing & ToolingAdvanced
38How does top-level await work, and what constraint does it place on modules that import that module? JavaScript › ES ModulesJavaScriptES ModulesAdvanced
39What is a Stream in Dart, and how does it differ from a Future in terms of how many values it can actually provide over time? Flutter › Dart Streams & StreamControllersFlutterDart Streams & StreamControllersBeginner
40Why is proper error handling important in a Flutter app, and what happens by default if an unhandled exception occurs somewhere within a running app? Flutter › Error Handling & Crash Reporting (Sentry & Crashlytics)FlutterError Handling & Crash Reporting (Sentry & Crashlytics)Beginner
41What is an isolate in Dart, and how does it fundamentally differ from a traditional operating system thread used for genuine concurrent execution in many other programming languages? Flutter › Flutter Isolates & MultithreadingFlutterFlutter Isolates & MultithreadingBeginner
42What is the main isolate in a Flutter app, and why should genuinely expensive, computationally intensive work generally be avoided from running directly on it? Flutter › Flutter Isolates & MultithreadingFlutterFlutter Isolates & MultithreadingBeginner
43What are the basic different provider types in Riverpod, such as Provider, StateProvider, and FutureProvider, and when would you specifically reach for each individual different one? Flutter › Flutter Riverpod Code Generation & ProvidersFlutterFlutter Riverpod Code Generation & ProvidersBeginner
44What is a platform channel in Flutter, and how does it let your Dart code actually communicate with genuine native Android or iOS code when a required specific capability is not already available through an existing plugin? Flutter › Platform Channels (Native Android & iOS Integration)FlutterPlatform Channels (Native Android & iOS Integration)Beginner
45What is the difference between the microtask queue and the macrotask (task) queue? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyIntermediate
46How do you properly set up Flutter's global error handling using FlutterError.onError and PlatformDispatcher.instance.onError to automatically capture every uncaught error and forward it to a crash reporting service? Flutter › Error Handling & Crash Reporting (Sentry & Crashlytics)FlutterError Handling & Crash Reporting (Sentry & Crashlytics)Intermediate
47How should you properly handle a genuine network timeout and other common network errors, such as no internet connectivity, when making a request using either the http or Dio packages? Flutter › Networking with HTTP & DioFlutterNetworking with HTTP & DioIntermediate
48How do you properly implement request cancellation using Dio's own CancelToken, such as cancelling a search request the moment a user genuinely types a brand new different search query? Flutter › Networking with HTTP & DioFlutterNetworking with HTTP & DioIntermediate
49How should you properly and correctly handle an error that genuinely occurs on the native side of a platform channel, and how does that particular error actually get properly reported back to your own Dart code? Flutter › Platform Channels (Native Android & iOS Integration)FlutterPlatform Channels (Native Android & iOS Integration)Intermediate
50How do global error handlers like window.onerror and unhandledrejection work? JavaScript › Error HandlingJavaScriptError HandlingAdvanced
51How do you implement a retry-with-backoff pattern around a function that might throw? JavaScript › Error HandlingJavaScriptError HandlingAdvanced
52Why does Promise.resolve().then(cb) run before setTimeout(cb, 0), even with a 0ms delay? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyAdvanced
53What is 'starvation' of the macrotask queue, and how can recursive microtasks cause it? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyAdvanced
54How does Dart's newer Isolate.run API simplify the process of running a specific one off computation on a separate isolate compared to the older, considerably more manual Isolate.spawn combined with ReceivePort approach? Flutter › Flutter Isolates & MultithreadingFlutterFlutter Isolates & MultithreadingAdvanced
55How can you properly implement request deduplication to prevent several genuinely separate identical simultaneous requests for exactly the same particular data from all actually and wastefully hitting your backend server together at once? Flutter › REST API Integration in FlutterFlutterREST API Integration in FlutterAdvanced
56How should you properly design your app's own networking layer to genuinely support parallel loading of several genuinely independent pieces of data needed for a single given screen, while still properly and gracefully handling the case where just one of those particular requests genuinely happens to fail? Flutter › REST API Integration in FlutterFlutterREST API Integration in FlutterAdvanced