asynchronous Questions
8
Solved
I have lots of async methods in my server code, but I suspect that I have callers without await.
Is there a simple way to scan the code for calls where await is missing?
public async Task DomeSom...
Buffybuford asked 16/5, 2016 at 13:5
3
Solved
So I need to call an async function for all items in a list. This could be a list of URLs and an async function using aiohttp that gets a response back from every URL. Now obviously I cannot do the...
Incertitude asked 1/1, 2018 at 18:32
1
Solved
I have a Background Service that performs some tasks and jobs on a long running thread. For simplicity, We'll consider this as a scheduler that makes an async SQL call and repeats. Now I use AsyncL...
Eyewitness asked 2/5, 2024 at 15:35
1
I have a piece of code that look like this:
final Either<Failure, Unit> resA = await deleteA();
resA.fold(
(failure) => handleFailure(),
(success) async {
final Either<Failure, Unit...
Smokejumper asked 10/10, 2021 at 15:30
2
Solved
I have a Web Serial port that I want to read some data from. I'd like to use TransformStreams to do some processing (e.g. decode bytes to strings, separate out logical messages, etc) by using pipeT...
Stipendiary asked 25/2, 2022 at 7:28
6
I've got a Node.js app that gets a list of file locally and uploads them to a server. This list could contain thousands of files.
for (var i = 0; i < files.length; i++) {
upload_file(files[i]...
Barbaresi asked 2/3, 2012 at 20:27
9
Solved
I'm still struggeling with the async/await pattern so I'm here to ask you some precisions.
I saw this page explaining the async/await pattern pretty well. I'm posting here the example that bother...
Macedo asked 3/4, 2019 at 19:3
2
Solved
I read about AsyncLocal<T> from the MSDN documentation, but one point is still not clear for me.
I'm working on something like a context-bound caching/memoization, which has the simple purpo...
Sulfuric asked 21/4, 2020 at 10:39
4
Solved
When we use await in the code, generally the awaiters capture the context and use that as callback when the awaited task completed successfully. But, since await is generally a No-Op (No Operation)...
Ballocks asked 10/1, 2016 at 13:5
1
Launch Darkly have an example(https://github.com/launchdarkly/react-client-sdk/blob/main/examples/async-provider/src/client/index.js) of how to use asyncWithLDProvider with a React project (as belo...
Ohl asked 15/3, 2023 at 20:41
6
Solved
I am trying to use the new HttpClient in .NET 4.5, but Visual Studio complains that it doesn't exist. I have System.Net, but when I type System.Net.Http, it complains for that too.
Am I supposed t...
Desertion asked 1/5, 2013 at 21:6
7
Solved
Context: I need to make a large number of asynchronous calls (think around 300 to 3000 ajax calls) that are parallelizable. However, I do not want to strain the browser or server by calling them al...
Jaclin asked 20/3, 2017 at 5:33
9
Solved
I need to modify an existing program and it contains following code:
var inputs = events.Select(async ev => await ProcessEventAsync(ev))
.Select(t => t.Result)
.Where(i => i != null)
....
Sublapsarianism asked 26/1, 2016 at 10:26
2
My request is to get debugging data from the debugger and pycharm prompt:
Lets say I have an-old-style python synchronous program with a bug:
def listdir(self, remote_path):
with ssh.connect(se...
Lobel asked 13/5, 2020 at 10:10
6
Solved
I'm doing some unit testing. The test framework loads a page into an iFrame and then runs assertions against that page. Before each test begins, I create a Promise which sets the iFrame's onload ev...
Mefford asked 7/3, 2015 at 23:4
5
Solved
I am not clear (and can't find documentation clear enough): when using the lock keyword in an async method: will the thread be blocked if the object is already blocked or will it return a task in s...
Bedivere asked 19/11, 2013 at 23:51
7
Solved
I've observed that in the following code:
setTimeout(function(){console.log('setTimeout')});
Promise.resolve(1).then(function(){console.log('promise resolve')})
No matter how many times I execut...
Gapin asked 3/8, 2016 at 20:1
7
If I have the need to bind multiple properties from the same observable within my component template...
For example:
<my-random-component[id]="(myObservable$ | async).id">
...
<my-rando...
Holystone asked 10/10, 2018 at 22:30
12
Solved
I have a MVC project on ASP.NET Core, my problem is connected with IQueryable and asynchronous. I wrote the following method for search in IQueryable<T>:
private IQueryable<InternalOrderI...
Oneself asked 12/2, 2018 at 9:30
5
Solved
Is there to way write a T-SQL command to just make it sleep for a period of time? I am writing a web service asynchronously and I want to be able to run some tests to see if the asynchronous patter...
Arly asked 20/3, 2009 at 3:39
4
Solved
I am currently reading Async Javascript by Trevor Burnham. This has been a great book so far.
He talks about this snippet and console.log being 'async' in the Safari and Chrome console. Unfortunat...
Jacobah asked 30/4, 2014 at 15:25
4
Solved
I recently had to correct security issues in a web-application (that I didn't create).
The security problem was, it was using non-http-only cookies.
So I had to set the session-cookie http-only, ...
Centrosome asked 1/2, 2017 at 9:51
6
Solved
I've been messing around with the fetch() api recently, and noticed something which was a bit quirky.
let url = "http://jsonplaceholder.typicode.com/posts/6";
let iterator = fetch(url);
iterato...
Burin asked 31/5, 2016 at 20:26
14
I am working on an a PHP web application and i need to perform some network operations in the request like fetching someone from remote server based on user's request.
Is it possible to simulate a...
Cherlynchernow asked 9/1, 2013 at 13:27
3
Solved
I'm recently exploring TypeScript again. One of it's key limitations seems to be the incapability of typing function composition. Let me first show you the JavaScript code. I'm trying to type this:...
Calla asked 9/2, 2020 at 11:13
© 2022 - 2025 — McMap. All rights reserved.