Skip to main content

Questions tagged [task]

A task is an abstraction that is used to work with concurrency, it can denote operation that should be executed concurrently with the rest of a program. A task is a concurrent thread of execution in Ada and represents an asynchronous operation in .NET, also it corresponds to Threads in Java.

task
0 votes
0 answers
9 views

Task type error in reflection in legacy code

I have a legacy code in Framework v4.6.2 where I have to add some features. It will get a migration to .NET 8, but not just yet. I have touched some code though, transforming some synchronous code ...
ZorgoZ's user avatar
  • 3,238
0 votes
0 answers
58 views

Complete several Tasks in a specific order

I have an WPF application that collects and prints multiple pdf files in a specific order to a online printer. The problem is that it is taking very long time, one page takes about 10sec and the full ...
Rekan's user avatar
  • 9
-1 votes
0 answers
25 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
1 vote
4 answers
81 views

What is the proper way to convert Task to Task<T>?

I use a library that takes Task<T>, but sometimes I have to pass just Task, which I have to convert to Task<int>. What would be the more efficient/recommended option for converting the ...
fernacolo's user avatar
  • 7,299
2 votes
0 answers
57 views

Implementation of OpenMP iterator in task depend clause

I’m trying to adapt the code of the block matrix multiplication (example 5.3.5) in C + OpenMP using tasks. This code illustrates task dependencies using depend on array sections. Here is an excerpt of ...
nabayo's user avatar
  • 21
0 votes
2 answers
80 views

Navigation issue in Swiftui iOS 18 skipping a page

I have an app that takes an ObservableObject known as AppState(), sets up as StateObject and is passed through to MenuView() and so on as an EnvironmentObject from the @main struct. My MenuView makes ...
PW1990's user avatar
  • 453
-2 votes
0 answers
91 views

Asyncronous function don't run in the correct order [duplicate]

Why is my code not running in the correct order? I can’t figure out why my code is not executing in the correct order. My downloadData function includes and should run the following three functions in ...
Damiano Miazzi's user avatar
0 votes
1 answer
47 views

How to set the stack depth parameter when creating a task

In ESP-IDF you can create a task with the xTaskCreate() function: static BaseType_t xTaskCreate(TaskFunction_t pvTaskCode, const char *constpcName, const uint32_t usStackDepth, void *constpvParameters,...
Mark's user avatar
  • 4,662
4 votes
1 answer
65 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
0 votes
0 answers
45 views

How can I send the same query to multiple database hosts in a parallel way in ASP.NET Core? [closed]

I need to take a JsonFile full of connection strings and use it to send the same query to all of the databases. I want to monitor my DB hosts with queries I send to all of them and if I have an error ...
yochai's user avatar
  • 1
1 vote
1 answer
54 views

NSCFRunLoopSemaphore wait assertion error in NSInternalInconsistencyException

I've tried several ways to attempt to get async working in Playground. I've seen in a place where Task {} in combination with PlaygroundPage.current.finishExecution() may be the way to go: updated ...
nilgirian's user avatar
  • 105
1 vote
1 answer
62 views

When using Diagnostics.Process, blocks UI in WinForms C# 5.0

I need to create app that runs different commands (PowerShell.exe, ipconfig, etc.), but when the ExecuteCommand is called the UI freezes until work is finished. Tried to run the method using await ...
Hello World'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,505
-1 votes
1 answer
64 views

FreeRTOS callback is not called

I'm writing some code for ESP32-S3 with ESP-IDF that uses FreeRTOS. I create a simple task to read data from stdin and I want to invoke a callback after a reading. Here's my code: main.c #include <...
Mark's user avatar
  • 4,662
0 votes
0 answers
86 views

Await call doesn't wait for Completion second time onwards when called

I have a situation where we have to display a content view which is used as a popup control, it contains 2 fields and 2 buttons (Next and cancel). The requirement is to not close the popup till the ...
Saurabh's user avatar
  • 87

15 30 50 per page
1
2 3 4 5
575