52,044 questions
1
vote
0
answers
19
views
Tomcat server upgrade and Request.startAsync() error
Recently upgraded Tomcat server to 9.0.102 from 9.0.98. Now it throws the error:
org.apache.catalina.connector.Request.startAsync Unable to start async because the following classes in the processing ...
-1
votes
0
answers
65
views
Stream.Read vs Stream.ReadToEndAsync [closed]
Is there any difference in reading HttpRequest body in .NET 8 using Stream.Read with buffer size of Request.ContentLength and AllowSyncronousIO = true, or using Stream.ReadToEndAsync?
I'm also ...
0
votes
1
answer
22
views
Javascript dynamic javascript file loading then execution
here is the execution of my javascript:
ee_btn.addEventListener('click', () => {
//Ajax GET request to get data form and rendering it
RequestEEFormData(container, bounds).then(()=&...
3
votes
1
answer
55
views
Shiny make reactive() async with ExtendedTask and mirai
I have a simple shiny app where a dataset is created in a reactive() call and then plotted.
As the data creation might take a while, I want it to be called async so that the session can be used ...
1
vote
0
answers
46
views
Why does async/await sometimes lead to slower execution than raw Promises? [closed]
I've been working with JavaScript for a while and often prefer using async/await for readability. However, I recently ran into a situation where switching to raw Promises (using .then) actually ...
0
votes
1
answer
23
views
Asyncio: read new data from process stdout without blocking monitoring task
I write asynchronous process manager, and up till now I came up with this:
import asyncio
class AsyncLocalProcessManager:
def __init__(self):
self.process = None
async def submit(...
-1
votes
0
answers
33
views
How to wait for async code before continuing [duplicate]
I have the following code:
var myInvoices: Invoice[] = new Array<Invoice>();
var tasksToRun = new Array();
items.forEach(async (item) => {
await this.http.get(`/api/Timesheets` + item[0])...
0
votes
1
answer
36
views
Run few dialogs in WinUI3
I need to run few ContentDialog one by one. I use this code below to run dialogs:
await App.GetService<IFirstRunDisplayService>().ShowIfAppropriateAsync(App.AppXamlRoot);
await ...
0
votes
1
answer
136
views
What is the significance of the cancellation token in the call to Task.Run? [duplicate]
In my application I have a synchronous method that I am calling asynchronously by invoking Task.Run. I've noticed that the Task.Run call takes a cancellation token. However, in my tests I noticed that ...
-1
votes
1
answer
79
views
How to receive a "stream of input" using XMLHttpRequest object?
I have a javascript file which creates a XMLHttpRequest object and opens a connection to a PHP file and sends a form object to it.
The Javascript file is like this:
let formData = new FormData();
...
0
votes
0
answers
41
views
CUDA stream sync issue in custom activation offloader
I am trying to build an activation offloader, taking inspiration from autograd's save_on_cpu function: save_on_cpu.
To add more asynchrony, I'm trying to offload activations using a separate CUDA ...
2
votes
1
answer
78
views
How to run async function in sync in tokio runtime?
I would like to initialize SeaOrm database connection in sync for easier usage inside application and testing, but not sure how to do it without error. I'm fine with any type of blocking as this ...
2
votes
0
answers
58
views
Cancelling a stdin subscription does not seem to work correctly (dart)
I'm trying to read a line from stdio asynchronous in dart. I stumbled across these three solutions: https://gist.github.com/frencojobs/dca6a24e07ada2b9df1683ddc8fa45c6
What all three methods have in ...
1
vote
2
answers
76
views
How can I poll a Future from a Rust WASM app?
I am playing with WebXR and I would like to draw something that I fetch from the web.
The reqwest library is async and returns Futures. In my rendering loop I do not want to block until the Future is ...
0
votes
1
answer
62
views
ConcurrentDictionary GetOrAdd method valueFactory execution [duplicate]
In the ConcurrentDictionary documentation it is stated that the value factory is called outside the locks and that a key/value can be inserted by another thread while valueFactory is generating a ...