All fields

“Asynchronous Programming” in Information Technology

54 questions across 3 technologies.

Information Technology

54 questions in 3 technologies

#QuestionTechnologyTopicLevel
1What does asynchronous programming mean in PHP, and why is it different from PHP's traditional synchronous execution model? PHP › Asynchronous PHP (ReactPHP & Swoole)PHPAsynchronous PHP (ReactPHP & Swoole)Beginner
2How do you run multiple asynchronous operations concurrently and wait for all of them using Task.WhenAll? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingIntermediate
3How do IAsyncEnumerable<T> and 'await foreach' let you consume an asynchronous stream of values one at a time? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingAdvanced
4How do you correctly implement a producer-consumer pattern using System.Threading.Channels for asynchronous data pipelines? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingAdvanced
5What do async and await do? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingBeginner
6What is the difference between Task and Task<T>? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingBeginner
7What do the 'async' and 'await' keywords do, and how do they relate to each other? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingBeginner
8What is the difference between the async and await keywords in C#, and how do they work together? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingBeginner
9How do you run multiple async operations concurrently? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingIntermediate
10What does ConfigureAwait(false) do? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingIntermediate
11Why does calling .Result or .Wait() on a Task risk causing a deadlock, particularly in ASP.NET (non-Core) or UI applications? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingIntermediate
12What does ConfigureAwait(false) do, and when is it appropriate to use? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingIntermediate
13What are async streams in C#, and how does IAsyncEnumerable<T> differ from a regular IEnumerable<T> for handling large or slow data sources? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingIntermediate
14Why can .Result or .Wait() deadlock, and what's the fix? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingAdvanced
15How do you design for scalability and avoid thread-pool starvation? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingAdvanced
16How does CancellationToken propagate cancellation requests through a chain of async method calls? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingAdvanced
17How does the compiler transform an async method into a state machine, and why does this matter for understanding performance? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingAdvanced
18What is ValueTask<T> and when should you use it instead of Task<T> for performance? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingAdvanced
19What is the difference between Task and Thread in C#, and when would you deliberately choose one over the other? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingAdvanced
20What is ValueTask<T> in C#, and when does it actually provide a meaningful performance benefit over Task<T>? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingAdvanced
21How does async/await work under the hood in C#, and what specifically happens when execution reaches an 'await'? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingAdvanced
22How 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
23How 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
24How 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
25What 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
26How 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
27What 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
28How 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
29What 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
30How 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
31How 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
32How do you read and write an entire text file's contents using the simplest File class methods? C# › File I/O & StreamsC#File I/O & StreamsBeginner
33What 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
34Why 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
35What 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
36What 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
37What 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
38How does Memory<T> differ from Span<T>, and when would you use Memory<T> instead? C# › Arrays, Span<T> & Memory<T>C#Arrays, Span<T> & Memory<T>Intermediate
39What is exception filtering using the 'when' clause, and what advantage does it offer over catching and manually re-throwing? C# › Exception HandlingC#Exception HandlingIntermediate
40How do you efficiently copy data between two streams using Stream.CopyToAsync(), and why is this preferred over a manual byte-by-byte loop? C# › File I/O & StreamsC#File I/O & StreamsIntermediate
41How 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
42How 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
43How 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
44How 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
45How 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
46How 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
47How do you correctly and safely resolve a Scoped service from within a Singleton service using IServiceScopeFactory, avoiding the captive dependency problem? C# › Dependency Injection & IoC PrinciplesC#Dependency Injection & IoC PrinciplesAdvanced
48How 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
49What is 'exception filtering with side effects' and why is it considered a controversial but sometimes useful technique for logging? C# › Exception HandlingC#Exception HandlingAdvanced
50How do you correctly implement async, cancellable file I/O using CancellationToken with FileStream operations? C# › File I/O & StreamsC#File I/O & StreamsAdvanced
51How would you combine yield return with async/await to build an IAsyncEnumerable<T>-producing async iterator method? C# › Iterators & yield returnC#Iterators & yield returnAdvanced
52How 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
53How 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
54How 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