Linked Questions

0 votes
1 answer
352 views

Confused between Multithreading and Asynchronous Programming [duplicate]

As far what I understood is that, multi-threading is a capability we can provide to a single program to run multiple task or code blocks in parallel. For example, a spell checker is running on a ...
Aki's user avatar
  • 55
2 votes
1 answer
378 views

Why we refer to parallel programming as Asynchronous programming [duplicate]

In English, the word synchronous means "happening at the same time" while the word asynchronous means the opposite (i.e. "not simultaneous or concurrent in time : not synchronous") Why all references ...
Muhammad Gouda's user avatar
0 votes
2 answers
70 views

Not able to call asynchronous methods in correct order concurrently in C# [duplicate]

I am learning async methods in C#, and I am trying to create a small program that calls few methods in sequence with a small delay. at the end of the operation, I am calculating the total time elapsed....
Bluemarble's user avatar
  • 2,099
0 votes
0 answers
100 views

Is it possible to achieve true asynchronous programming in Java [duplicate]

I have been reading few articles around Multithreading and Asynchronous programming. From what I understand, true Asynchronous tasks doesn't need a new Thread to be created. But most of the articles I ...
mjsg's user avatar
  • 1
1682 votes
43 answers
441k views

What is the difference between concurrency and parallelism?

What is the difference between concurrency and parallelism?
StackUnderflow's user avatar
467 votes
3 answers
197k views

What is the difference between asynchronous programming and multithreading?

I thought that they were basically the same thing — writing programs that split tasks between processors (on machines that have 2+ processors). Then I'm reading this, which says: Async methods are ...
user5648283's user avatar
  • 6,243
69 votes
2 answers
43k views

How can I perform parallel asynchronous HTTP GET requests with reqwest?

The async example is useful, but being new to Rust and Tokio, I am struggling to work out how to do N requests at once, using URLs from a vector, and creating an iterator of the response HTML for each ...
user964375's user avatar
  • 2,471
40 votes
5 answers
21k views

Calling TaskCompletionSource.SetResult in a non blocking manner

I've discovered that TaskCompletionSource.SetResult(); invokes the code awaiting the task before returning. In my case that result in a deadlock. This is a simplified version that is started in an ...
hultqvist's user avatar
  • 18.7k
26 votes
5 answers
17k views

Dart is Single Threaded but why it uses Future Objects and perform asynchronous operations

In Documentation, Dart is Single Threaded but to perform two operations at a time we use future objects which work same as thread. Use Future objects (futures) to perform asynchronous operations. ...
M.ArslanKhan's user avatar
  • 3,976
13 votes
1 answer
21k views

Writing multithreaded methods using async/await in .Net 4.5

I have a small query. I admit that I haven't use multithreading much before .Net 4.5, but with the new async/await functionality I decided to give it a try. I started experimenting with it and all ...
Milcho's user avatar
  • 339
5 votes
1 answer
12k views

How do i run a future without awaiting it? (in rust)

I have some async function async fn get_player(name: String, i: Instant) -> Option<Player> { // some code here that returns a player structs } in my main function i want to run the above ...
SeriousProgrammm...brrrr's user avatar
9 votes
2 answers
2k views

Task.Run continues on the same thread causing deadlock

Consider the following async method that I'm going to wait synchronously. Wait a second, I know. I know that it's considered bad practice and causes deadlocks, but I'm fully conscious of that and ...
Eugene D. Gubenkov's user avatar
2 votes
1 answer
4k views

Is it mandatory to await SaveChangesAsync() on asyncronous EF?

My scenary is something like this //a lot of database dependant processing db.SaveChangesAsync(); //asynchronouly saving database changes //a lot of ANOTHER long term database INDEPENDANT stuff ...
Vitor Luiz Rubio's user avatar
0 votes
2 answers
3k views

How to speed up IronPdf when using async/await

I'm trying to make a piece of code run faster. The code is already using async/await. But it's still slow. So I tried to alter my foreach to use the new IAsyncEnumerable. However I gained 0 ...
Snæbjørn's user avatar
  • 10.9k
2 votes
2 answers
1k views

Is finally executed only after a returned Task is awaited?

I have an asnyc method which returns a task and is doing some cleanup work in a finally block: public Task<byte[]> MyFunction() { string filename = CreateFile(); try { return File....
mat's user avatar
  • 1,817

15 30 50 per page