Multi-threading is the ability of a computer or a program to perform work concurrently or asynchronously by utilizing multiple concurrent streams of execution (generally referred to as threads).

0
votes
0answers
6 views

Tensorflow session.run() hangs if session is created in another thread

I use C++ tensorflow API v.1.8. In my use case session.run() should be executed in multiprocessing mode. I have multiple threads that execute session.run(), threads are created with fork().In parent/...
5
votes
1answer
35 views

Atomic variables vs synchronized methods

I have a counter class which has increment and decrement method, both the methods are synchronized.public class Counter {int count=0;public synchronized void increment(){count++;...
0
votes
0answers
10 views

JRocket : Thread Stuck at jrockit/vm/Locks.park0

Seeing very strange behaviour. My code is executing well but not sure what happen, method is calling to other method but other method doesnt get called ( i cant see logs which is there in the first ...
0
votes
1answer
16 views

Is there any reason to lock a queue?

I'm just wondering if there would be any reason I might want to lock a queue. I am working on an application that has several threads that reads and writes to a database. In order to reduce traffic, I ...
0
votes
0answers
12 views

getting Crashing thread: TcpChannelThread in Splunk

last week we encountered a sudden downtime for the splunk search head instance and it suddenly stopped running. can you please help us decipher the log below. Received fatal signal 6 (Aborted)....
-1
votes
1answer
33 views

If one thread throwing an exception then How to stop other waiting threads

In Java If I have three thread t1,t2 and t3. Suppose t1 is executing some task and t2,t3 are in a waiting state. Now If t1 is facing/throwing any kind of exception then I do not want to execute my t2,...
0
votes
0answers
16 views

Multiprocessing Pool and Webdriver

I'm collecting publicly available PDFs from a few websites (~10k webpages). I'm working with selenium. I want to run in parallel, but am a novice at using Pool. I would like resources or feedback on ...
1
vote
2answers
27 views

fork/join, synchronization necessary on input array?

I have a large array of objects and want to collect all objects with certain field value and because it is such a large array, i plan on using fork/join in java.the large array is forked not by ...
0
votes
0answers
39 views

Accessing deleted object not causing crash [duplicate]

Consider the following code:void g(std::vector<int>& V) {std::this_thread::sleep_for(std::chrono::seconds(2));for (int i=0; i < 100; ++i) { V.push_back(i); }for (int i ...
1
vote
2answers
35 views

How to call methods with different parameters as Action?

I'm working on a game in Unity and Unity is not threadsafe so whenever I do some calculations on different thread and want to go back to Unity I need to queue calls in some kind of queue so Unity can ...
1
vote
0answers
14 views

Unable to repopulate a queue in python 3

The code is getting exited when I run the following codeimport mysql.connectorimport mysql.connector.pooling as ximport timefrom threading import Threadfrom queue import ...
0
votes
1answer
15 views

How to handle simultaneous updates on a variable in Ver.tx?

I am new to Vert.x. I have one scenario in which I need to make a count for all incoming request into a verticle ‒ which is serving as a REST API.If I just increment the counter for all request, ...
1
vote
1answer
14 views

Python/Threading/Barrier: Is this a correct usage of Barrier?

Perhaps i have not understood the barrier concept of threading. But i wrote a code that i want to learn it is a correct usage of barrier or not.Here are the codes:#!/usr/bin/env python3# -*- ...
-1
votes
0answers
15 views

Qt Thread Error

Got this problem with Threads. Problematic code:MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow){ui->setupUi(this);thread=new QThread(this);...
0
votes
2answers
33 views

How can i synchronize the getters without having an incoherent state?

I tried to synchronize the getters with adding synchronized to the methods but i have always John Odd and Jane Doe. Any suggestion how can i synchronize the two Strings in that case ?this is my ...
0
votes
0answers
23 views

C++ Opencv: Performance in multithreaded environment

In my C++ program I create 3 pthread. The first 2 threads create socket and receive data (integers) from different ports. The main() function at the same time is writing these received values (by the ...
1
vote
1answer
12 views

Producer/Consumer: Should i write condition.release() for the consumer?

While i was studying on an example that taken from https://www.laurentluce.com/posts/python-threads-synchronization-locks-rlocks-semaphores-conditions-events-and-queues/ , i saw that if i put the self....
0
votes
0answers
37 views

Java - Race condition on two arrays access

Let me introduce the following scenario.I have t threads performing reading operations on an array A that contains n points (of d dimension), each thread receives an interval [i, j] of points such ...
2
votes
0answers
34 views

Calling child thread method from parent thread

I have a Chat program (running on android) that runs a ui (Chat_client) and then creates an ChatThread that runs communication. I have managed making the client thread call a parent method (using post)...
1
vote
1answer
25 views

Image Slideshow using JFrame

I have a problem with a task that seemed to be pretty easy. I have to create a program that will show images (.jpg,.png and .gif) consecutively. Images have to be the contents of some files, that is ...
0
votes
0answers
11 views

The value is not taken from the dictionary in JMH when thread is 2?

For a JMH class, Thread number is limited to 1 via @Threads(1). However, when I get the number of threads using Thread.activeCount(), it shows that there are 2 threads.The simplified version of ...
-1
votes
1answer
36 views

.NET TPL Thread Performance Issue

I am working on the web scrapping project and I am using .NET Core 2.0. My customer provided around 1Million Domain and customer asked me to check the domain is active and check the response is OK. My ...
0
votes
1answer
32 views

How to calculate the loop for Parallel ping?

I have a list of IP with unknown number of items (could be 1578 , 500 , 1253 ....).I want to create a loop that take every time just 10 item and check ping to them (so the server will not get stuck )....
0
votes
0answers
17 views

Metal multiple compute shaders vs single

I am running multiple (4 or 5) compute shaders that process the same data and give different outputs. User may however enable one, some, or all of them. I have two choices from performance ...
0
votes
0answers
34 views

How to continuously check internet connection in a multi threading application?

String url=settings.Get("URL");HttpWebRequest httpRequest=(HttpWebRequest)WebRequest.Create(url);httpRequest.Method="GET";HttpWebResponse res=(...
0
votes
2answers
86 views

Should I use a Critical Section or a memory barrier when setting a shared variable?

Say I have the following code:/* Global Variables */int flag=0;int number1;int number2;//------------------------------------/* Thread A */number1=12345;number2=678910;flag=1;//...
1
vote
2answers
47 views

How to manipulate the GIL when many threads need to execute?

My understanding is that the typical GIL manipulations involve, e.g., blocking I/O operations. Hence one would want to release the lock before the I/O operation and reacquire it once it has completed....
0
votes
1answer
27 views

The thread 0xc28 has exited with code 0

In the case of a message in the output window in Visual Studio showingThe thread 0xc28 has exited with code 0How do I know what thread it belongs to? For example, if its one I added or a system ...
0
votes
0answers
31 views

Thread.start() gives me TypeError: 'datetime.datetime' object is not callable [on hold]

I have a package 'A' where I use datetime module so I import it like this:from datetime import datetimeBut, when I import package 'A' in my code to use some of its functions and I use the ...
0
votes
2answers
28 views

How to kill threads spawned when using the multiprocessing's Pool imap_unordered

I'm trying to speed up a simple Python program using multiprocessing's Pool. Specifically: the imap_unordered function. In my case I'm searching for a specific object with specific properties, and ...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,