All Questions
Tagged with synchronization .net
324 questions
0
votes
0
answers
42
views
C# Unity - High Precision Timer using TimerQueueTimer
I'm trying to execute a C# callback every 10ms with a 1ms accuracy if possible. For the moment in my project I'm simply using a spin loop and stopwatch and I did achieve the desired result with <...
0
votes
0
answers
75
views
How do non-blocking algorithms vs user mode synchronization relate to each other?
How do non-blocking algorithms¹ vs user mode synchronization² relate to each other?
Usually these concepts are spoken about separately. And problem is that I don't understand it clearly, because I am ...
1
vote
0
answers
59
views
Daisy-chaining Semaphore/SemaphoreSlim calls?
Let's suppose I have an operation that uses a resource protected by a quota (reqs/s). Think for example any rate-limited Cloud service:
public class ExternalService
{
public async ValueTask ...
0
votes
0
answers
43
views
How can I run a method Syncronously when it gets called by an concurrent method
I am using c# .net
I have a POST method in my controller that gets called very quickly by a client. This method gets run concurrently by MVC nature.
[HttpPost]
public IActionResult PostDog(){
...
3
votes
1
answer
115
views
Is ManualResetEventSlim with spinCount = 0 the same as ManualResetEvent?
As far as I know, slim versions of synchronization primitives use spin waits before using resources of the kernel.
Is it true that ManualResetEventSlim with spinCount = 0 is the same as the usual ...
0
votes
2
answers
505
views
Synchronizing data between client and API (Database) .NET 6
I am currently working on a task where I need to synchronize the data, example:
Client makes a request to get data to the API (API has access to the database), client received the data and saves it to ...
0
votes
1
answer
87
views
Centralize millions of records from 1000+ DBs
We have 1500+ Local Servers, where we use a PostgreSQL DB where we store some sales transactions data.
Each local server, would add daily about 200+ records, so that's about 300.000 daily records (...
-1
votes
1
answer
202
views
Bi-Directional Data Sync
I have a query on bi-directional data sync.
The scenario is, that we have ERP software running on a local network
which is developed in PowerBuilder and the database is SQL Anywhere 16, Also, we have ...
1
vote
1
answer
477
views
Best way to order parallel processing of commands with the same attribute
I have a queue of commands. Some of them have the same attributes, say "document id". I need to be able to process them all in parallel, but with one restriction: commands with same features ...
6
votes
1
answer
1k
views
What is the minimum wait time to use ManualResetEventSlim instead of ManualResetEvent?
From NET 4 I can use the ManualResetEventSlim class that make a little spinning before blocking in order to get a time optimization if the blocking time is little (I have no context switch).
I'd like ...
-1
votes
1
answer
283
views
How to use FileSystemWatcher for synchronizing two folders action's
So,i have a task :
Sync content of the 2 dirs in real time
Given the paths of the 2 dirs,listen for changes in dir1 and synchronize the actions with dir2.This means that when i create a new file in ...
1
vote
0
answers
67
views
Azure devops pipelines - shared complex data between runs and different pipelines
I'm looking to execute some integration tests using CloudTestAgentTask@4, however these tests require a user. I do however want to avoid using the same user for every run because these runs can be ...
3
votes
0
answers
534
views
Alternatives for Monitor (Wait, PluseAll) in Async Tasks in C#
I implemented Task synchronization using Monitor in C#.
However, I have read Monitor should not be used in asynchronous operation.
In the below code, how do I implement Monitor methods Wait and ...
12
votes
1
answer
35k
views
What is the best practice to call Async method from Sync method? [duplicate]
I know some people will argue "why don't you just make SyncMethod() to async method?". We wish, but in a real world, sometimes we have to keep SyncMethod the way it is for backwards ...
-2
votes
1
answer
128
views
Async non-polling disposal mechanism to wait until all method calls are finished in .NET 5 C#
Often I find my component having a public async (returning Task<T>) method M and DisposeCoreAsync. Other components are using this component by calling M. The application runs and at some point ...