-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task.WaitAll(taskList.ToArray()) never fisnishes #94
Comments
Hello Alfonso, I can reproduce this issue. It stops responding on WS calls but works fine on HTTP calls. The root cause it that you are using I am not sure of what you want to do but one major difference between the two methods is that In general, it is a best practice to use Like you, I wasn't expecting this behavior because I have to consume an Thanks for raising this issue. |
Hello Odonno As you said, by modifying my code from
to
it works. For now I think I can work with it. Unfortunately, I just tested the parallelization of several
against
And the Really thank you for your help and fast answer. Best Regards |
Yes. It depends on what you need once again. :) Small article that explains the difference: https://blog.nimblepros.com/blogs/task-whenall-vs-parallel-foreach/ |
Dear all
As always, thank you for your hard work
Maybe I'm doing something wrong, but I think I have found an issue.
Launching several tasks to
Create
several tweets in parallel and usingTask.WaiAll()
does not work correctlyI have been using the latest 0.40 version with Core NET 8.0
SurrealDB (latest version 1.3.1) is the table tweets with no records.
This is the test code I have prepared.
Please notice there are 2 methods. One is the basic SurrealDB
Create
methodThe other is a dummy method used to compare the execution.
When I use the code with the
Create
the execution is stuck on theTask.WaitAll()
forever, but checking the DB with Surrealist I can see that the 5 records were inserted.When I use the code with the
DummyTask
the execution continues and the program finishes.I have not tested the code with HTTP instead of WS, but it could have the same behaviour.
The text was updated successfully, but these errors were encountered: