Category "multithreading"

Can we invoke method outside the thread block by any technique in C#? so that we can use same thread method to invoke other methods as well.?

e.g. Here in this example, if I want to start thread on method M1 this way, Purpose is I need to call M2, M3 on same thread method to avoid repeated code. Is th

How to limit execution time of a function call?

There is a socket related function call in my code, that function is from another module thus out of my control, the problem is that it blocks for hours occasio

Java cant edit thread stopwatch timeout

Hey I created this code for timeout in my tcp communication, but after I run thread, I can't change the end time? any ideas? public class Timer extends Thread{

Does a java thread come back to running state soon after it receives the response in wait state after making rest template call?

I have a REST API service which makes an REST API to an external system using RestTemplate. Time out set is 3 sec. To make this external call, I have an Executo

Main thread usage loop advise needed

Im building an app on Linux in C++, and I find it convenient to move all periodic tasks to other threads. This is my first multi-threaded Linux app(and basicall

Share django transaction across threads

I've a problem where one API implemented in a django (3.2) web app running with gunicorn (gevent) has to fetch different prices from multiple APIs and store tho

Strange infinite loop in thread in c# using network sockets

I made a little experiment where a server send continually a message to a client until a second client be connected. Testing with telnet, the first client recei

Java : Are sub threads lock the main thread?

I am new to Java, I have want to starts 02 thread to increase an attribute of an object and I want to print out the value of this attribute until it reach a cer

Can I use actors in Swift to always call a function on the main thread?

I recently saw that Swift had introduced concurrency support with the Actor model in Swift 5.5. This model enables safe concurrent code to avoid data races when

Can 2 processes run on same enclave in intel sgx?

I know intel sgx supports running multiple threads on one enclave. But I'curious that whether I can use fork to run 2 processes on one enclave?

How to run multiple "docker cp" commands at the same time in the same Linux VM?

I executed "docker cp" to copy 2 different folders inside a container application to the host. Both the size of the folders are big. However, I found that only

Using queue Between two object of class

In order to send messages between two objects of class! I implemeted this class User { public: virtual void run() { while (true)

PySimpleGUI how to run a perform_long_operation function that returns a value

just started learning and using PySimpleGUI. So far, everything works. I have a method that trains an AI and returns the model: model = train_model() As this m

does pthread_join affects concurrently

I want to run all threads concurrently. If I use pthread_join function does it affect running of threads concurrently? pthread_join(..)

Run loom demo on IDEA

I want to run loom's demo, I downloaded jdk18-loom from http://jdk.java.net/loom/, and downloaded the latest version of IDEA: No matter I choose X or 17-previe

Error while popping out Flask app context

I am trying to create an async API using threading (Celery is an overkill in my case). To achieve the same, I subclassed the Thread class in following manner. S

Simulate Time Series Events with Accurate Scheduler

I have an API which I will need to run some tests. We have already done the stress and load testing but the best way to test is to run some real life data. I ha

Multithreaded socket programming : sharing variable

Hi I want to implement a ring of sockets .For example IP address 127.0.0.1 listens to 127.0.0.3 and this one listens to 127.0.0.2. They are supposed to share so

Is it possible to pause/resume a web worker externally?

I've seen that web workers have a terminate() function, but is there a way to pause and resume web workers from the host thread similar to interrupts? The crit

Run a while-loop as subprocess in background

Unhappily my last post was marked as duplicate and my problem wasn't solved. So I've to phrase it a little bit different. Below you can see my main-file(SP_Tes