skip to Main Content

Ubuntu – How to send multiple requests to a server at few milliseconds of interval in C#

I have a code that looks like this: public static async Task<Request> SendRequest(Client client, DateTime startTime, int offset) { TimeSpan timeToWait = startTime - DateTime.UtcNow + TimeSpan.FromMilliseconds(offset); await Task.Delay(timeToWait); Console.Write(offset); Request request = client.sendRequest(); } async static public Task<Request> SendMultiple(Client…

VIEW QUESTION

Task.Run in C# Azure Functions

I'm using the following logic that seems to run in parallel when running locally, but when deployed on azure functions, it's running sequencially: var allRecordTasks = new List<Task<DataRecord>>(); for (int i = 0; i < 100; i++) { allRecordTasks.Add(Task.Run(() =>…

VIEW QUESTION
Back To Top
Search