1,695 questions
Advice
1
vote
12
replies
176
views
Prevent Winforms function from returning until Async calls have completed (without blocking)
I have a handler for AppDomain.CurrentDomain.UnhandledException that uses Async calls to write an error log file. Unfortunately, it returns to the source of the exception (which then shows the ...
Score of 2
1 answer
162 views
fix blocking issue when trying to parse HTTP request in java
I'm trying to parse HTTP requests for fun and I'm currently stuck because the method I'm using blocks until input is received.
byte[] buffer = new byte[1024];
while (!request.isDone()) {
int n = ...
Score of 2
0 answers
117 views
Error calculation for a time series using autocorrelation
I'm trying to calculate the autocorrelation time for a time series generated from molecular-dynamics trajectory frames. I used several methods to estimate the autocorrelation time because I need it to ...
Score of 3
2 answers
121 views
Why doesn't readFile block on unix pipe in which no write has happened yet?
If in a terminal I enter
mkfifo /tmp/pipe
echo hello > /tmp/pipe
(which blocks) and in another I run the haskell program
main = readFile "/tmp/foobar" >>= putStr
then I see it ...
Score of 2
3 answers
472 views
PowerShell + WPF: Background worker and interacting with UI
I'm currently building a GUI application using PowerShell and WPF, and overall, I'm quite pleased with how easy it is to spin up a user interface for small tools without having to dive into full-blown ...
Score of 0
1 answer
97 views
Why in python would blocking code delay a non-blocking sleep timer?
In python, if I run the following code:
import asyncio
import time
from datetime import datetime
async def delay(n: int, id: str):
await asyncio.sleep(n)
print("I am:", id, ...
Score of 1
0 answers
23 views
TestStack.White UiItemContainer.Get() is blocking for the complete BusyTimeout delay even if the searched item is present earlier
In my Test app, using TestStack.White nuget package (last available version: 0.13.3) I need to search an Item with a given AutomationId in a container (main app window). I want to wait for it for max ...
Score of 3
0 answers
75 views
Peek tokio TcpStream is blocked
I edited the original question cause I found a simpler reproduction.
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let ln = TcpListener::bind(("0.0.0.0", 6789)).await?;
...
Score of 0
0 answers
160 views
Blocking method on a JFrame (or JDialog)
I need that my readString method be blocking until user input his text into the TextArea. This is a model of my problem:
public class Consola
{
private final JDialog dialog;
private final ...
Score of 0
0 answers
57 views
attempting to execute 3rd party dll in separate thread but this still blocks main thread
In my Kivy app I initialise some instrumentation via 3rd party .NET dlls. One of these dlls is badly behaved - takes several seconds to initialise.
To keep the app GUI responsive, I tried to ...
Score of 0
1 answer
48 views
Code written in golang, output as a C dynamic library, is called by posgres17, but Golang-generated dynamic library functions is blocked
everyone:
I wrote a demo, but it doesn't work properly, can you help me, thank you very much.
Code written in golang, output as C dynamic library "libtest1.so", is called by the "...
Score of 0
1 answer
194 views
How to add a big quantity of numbers in Call Directory Extension?
I need to implement a logic for adding a big quantity of numbers into the Call Directory Extension.
I use this function for generating and adding numbers:
func generatePhoneNumbers(from pattern: ...
Score of 2
1 answer
1710 views
Micronaut Event Loop vs @ExecuteOn(TaskExecutors.BLOCKING)
So the Micronaut docs tell us that Micronaut uses an event loop:
Micronaut framework is built on Netty which is designed around an Event loop model and non-blocking I/O. Micronaut executes code ...
Score of 1
0 answers
31 views
WebSockets message sending order
I am making blocking requests calls in a WebSockets server just to test a thing out, but I experienced a weird behavior.
There is one client connection, sending a single message. The message is ...
Score of 0
0 answers
64 views
WScript.Shell.Exec - Check if subprocess.stdout has data before synchronously reading
Context
I am using the following code to read stdout of a process launched with Wscript.Shell.Exec
Sub Main()
Dim lspProcess As IWshExec = CreateObject("Wscript.Shell").Exec("deno ...