Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
3 votes
0 answers
46 views

Can the "Stateless" State Machine be made thread-safe with external locking?

I've understood from the start that the Stateless state machine is not thread safe. But I don't need it to be as long as I have a way to fix it externally. I was under the impression that if one ...
Joe's user avatar
  • 6,337
0 votes
1 answer
52 views

Multi thread Automation scripts Selenium C# (Threads - 8). After sometime the CPU went to 100% utilization as the Edge browser is not getting closed

Selenium - C# I triggered a multi-thread Automation scripts(200 scripts) (Threads - 8). After some time the CPU went to 100% utilization as the MsEdge browser is not closing and it eats up all the ...
Karthik KD's user avatar
-1 votes
0 answers
26 views

Multithreading for Async function resulting into error in C# [duplicate]

I am new to this C# language. I have function in which I need to call an async function multiple times on separate thread. After the debugger hits WaitAll() or WhenAll() both are giving me below ...
Utkarsh Kendre's user avatar
0 votes
1 answer
60 views

Is there a way to make tasks/threads that execute in multiple stages?

I am trying to figure out how to improve my use of C# and solve a few problems in my code (which is the subject of a much more panicked question I posted earlier and which I will likely take down for ...
Cameron Hadland's user avatar
-1 votes
1 answer
44 views

WebService how to prevent async calls

We have a situation where a user submits an xml file to a server, the file is then checked for unique references and the new references are stored in a database. If they submit the same references ...
josmond's user avatar
5 votes
1 answer
102 views

Deeply understanding Volatile and Memory Barriers

I have been reading a ton on this topic over the past view days but would really like clarification on what I learned so far in relations to C# and C. Firstly, Atomicity seems to be fairly intrinsic ...
UnSure's user avatar
  • 178
1 vote
2 answers
124 views

Dictionary is having duplicate keys

Can a Dictionary have duplicate keys? Or is there something else, I am missing? Here is the code Dictionary initialization is at class level. StoredPoints.Keys Count = 4 [0]: "SN6J1701_B" [...
Malik Rizwan's user avatar
4 votes
1 answer
67 views

Is there a way to get multiple async methods (tasks or threads) to wait until certain individual conditions happen?

I am trying to get a call/response system working with an arduino controlling a mechanism via the serial port. The controlling computer creates a Task/thread that handles each job assigned to the ...
Cameron Hadland's user avatar
-1 votes
1 answer
84 views

Synchronize large csv file into DB with dotnet core

I want to develop a batch process in .NET Core to synchronize a CSV file containing 3 million lines. The process reads data from the file, updates existing items in the database, and creates new items ...
Imane Sab's user avatar
-1 votes
1 answer
95 views

How is it possible to start more threads than my machine's logical cores? [closed]

I have created below program to understand the threads. Below program creates 1000 threads and created the loop to run for very very long. for(int i = 0; i < 1000; i++) { var j = i; Console....
Sivarajan Sivanesan's user avatar
-6 votes
2 answers
97 views

Thread is not running, how do I start the thread to make it run every 300ms [closed]

I'm trying to get this to run every 300ms but it doesn't run at all var gametick = new System.Threading.Timer((e) => { //stuff }, null, 0, TimeSpan.FromMinutes(Convert....
Tilak Rao's user avatar
1 vote
2 answers
82 views

How does a race condition occur?

I have a single item pool implementation: public class OneItemPool<T> { private T? _item; private object _lockForChangeValue = new(); private object _lockForPostItem = new(); ...
Kliment Nechaev's user avatar
0 votes
0 answers
39 views

C#.Net IBM MQ Multi threaded application Connection Issue with Username and Password

When I connect to IBM MQ QueueManager using multi-threading, it does not connect all of the requests to MQ. Few connect and few fail. If I use thread count as 1 then all the request are connected. ...
Pradeep Kumar's user avatar
2 votes
1 answer
78 views

Is there some known official rationalization of why Task.IAsyncResult.CompletedSynchronously always returns false

The most recent documentation forTask's explicit interface member implementation of IAsyncResult.CompletedSynchronously states the following: true if the operation completed synchronously; otherwise, ...
Ivan Petrov's user avatar
  • 1,585
-3 votes
1 answer
164 views

Explain the difference between the two approaches to invoking asynchronous operations [duplicate]

I have two variations of the code that will be provided below. The task of the code is as follows: I have two URLs that I make an HTTP Get request on, and I want to get content from there. In the ...
Jeffrey Willis's user avatar

15 30 50 per page
1
2 3 4 5
1610