Skip to main content
Code Review

Questions tagged [async-await]

This covers the asynchronous programming model supported by various programming languages, using the async and await keywords.

Filter by
Sorted by
Tagged with
2 votes
1 answer
73 views

C# .NET 9 API for managing a personal investment portfolio

I've written a C# API using .NET 9 with the goal of managing a personal investment portfolio – that means, adding funds adding or removing transactions (for ETFs, ETCs, and usual funds) retrieving ...
Daniel's user avatar
  • 353
1 vote
0 answers
47 views

Async Rust UdpServer with Clean-Shutdown (using Tokio)

I'm new to Rust and trying to build an async Server. The server should receive UDP packets, process them (which will include more network communication), and respond the result to the client. I had ...
x539's user avatar
  • 201
8 votes
2 answers
1k views

C# wait for a state change without blocking

I have a class that manages an HttpClient to make API requests to a third party service. The service requires being logged in to make requests. When logged in, a ...
5 votes
1 answer
104 views

Find food related words in German: Seeking Feedback on Concurrency and Code Organization

I'm developing a pipeline that processes unknown ingredient data from the OpenFoodFacts API. The goal is to find valid German words that are not yet in their taxonomy. The tool performs the following ...
5 votes
2 answers
983 views

An AsyncStreamWriter that allows to asynchronously write to a Stream

I'm hoping this should be mostly asynchronous, looking to make this close to 100%, if not 100%, so. This class was created to ease converting image formats, but it has an unlimited number of use cases....
2 votes
1 answer
149 views

Simple priority task scheduler implementation

My project I am working on requires the following functionality for the processed messages: each message has a priority messages with higher priorities should have precedence over the ones with lower ...
2 votes
1 answer
203 views

Proving that a Window Message is being sent by async/await

I asked a question on Stack Overflow and there's a discussion between @Serg, who posted an answer and @Jimi, whose comments suggest that the answer might be wrong. So I implemented the following code ...
4 votes
1 answer
188 views

Implement DRY principle with IAsyncDisposable

This is a tiny class that creates backup copies of a file so these can be diff'ed to spot the changes compared to last run; used when generating code and so far has proved to be very helpful. ...
4 votes
2 answers
158 views

Idempotent JavaScript script loader

I wrote an idempotent script loader (for the browser), where the same script won't be loaded more than once. scriptLoader.js: ...
lonix's user avatar
  • 153
3 votes
2 answers
2k views

Extension methods to modify an async Task's type from Task<IEnumerable<T>> to Task<List<T>>

I've written a lot of (await SomeTask).AsList(); in my project, and it's kind of annoying to keep wrapping it. To fix this I've written a little extension method on ...
0 votes
1 answer
1k views

TCP Server using Tokio

Solving the following problem on Protohackers: https://protohackers.com/problem/1 The problem: Each request is a single line containing a JSON object, terminated by a newline character ('\n', or ...
Rish's user avatar
  • 2,486
1 vote
1 answer
178 views

Asynchronous tasks to subscribe to orders and fills

Pretty straightforward question. The methods SubscribeToOrdersAsync and SubscribeToFillsAsync are pretty similar due to ...
nop's user avatar
nop
  • 819
2 votes
0 answers
186 views

Timer built in Unity using Async Await

For learning purposes, I built a timer that does something every x seconds in Unity using an async Task instead of a coroutine. I'd like to know if there is a less awkward way of writing this: What ...
1 vote
2 answers
139 views

Scraper to grab publicly available data

I am using Python scraper code to grab publicly available data from http://103.48.16.132/echalan/, but it takes almost 6gb of memory and more cpu. I need to run ...
2 votes
1 answer
137 views

Basic node login routes for authentication system

I am building a basic authentication system with a node backend and wonder whether I am using the try-catch block excessively. I have this example controller: ...

15 30 50 per page
1
2 3 4 5
...
23

AltStyle によって変換されたページ (->オリジナル) /