Most voted "multithreading" questions
Multithreading is a popular programming model that allows multiple line execution within a simple context, sharing process resources, and capable of running independently.
Learn more…199 questions
Sort by count of
-
0
votes0
answers235
viewsMultiple Database Connections - Multi-task c# executable
I have an executable that I need to run a database giant. How the processing time would be unviable if I did it in a single Thread.... Following the idea of this question, I decided to create an…
-
0
votes1
answer31
viewsProblem with scope of variables in child class
I created an interface with Tkinter to use as Environment for my studies with reinforcement learning. My goal is to run the class that creates Nvironment and with an external loop, send actions to…
-
0
votes0
answers24
viewsWhat is the difference between Thread and Threading in python
I’m using Python 3.7.x When I call a thread through the command: t = Thread(target=.... In VS Code shows the thread list in CALL STACK (Call Stack) and runs normal. But when I call through command:…
-
0
votes1
answer487
viewsAndroid - Asynctask and Progressdialog
Hey there, guys. I’m just starting in the Mobile area and I’m having some problems with the issue of user experience in my App. In my App, it obtains a JSON from the server through a AsyncTask.…
-
0
votes2
answers479
viewsCompetition and memory sharing between Threads
I have the following code: class Objt { public List<t> list_t1; public List<t> list_t2; public Objt() { // faz inicializações } public void handleLists(List<t> list) { for(t e:…
-
0
votes1
answer97
viewsConcurrent list modification can cause "java.lang.Illegalargumentexception"?
I have a multi-threaded program that makes concurrent modifications to an unsynchronized list (by bad design decision). Sometimes, in a seemingly unpredictable way, I get…
-
0
votes1
answer180
viewsForce running order Swift 3/Xcode 8 - Threads
Hello, I’m new to Swift and this week I came across a problem that is already making me pull my hair out! What happens is this, I divided in my application in several classes to make my code more…
-
0
votes0
answers143
viewsIs Browse really a multithreaded application?
Once, in the discipline of Distributed Systems, the teacher asked a question and he himself answered: What multithreaded application example is widely used by everyone? Browse (browser), since…
-
0
votes1
answer142
viewsGlobal control for Executorservice
I run a software locally in Java SE, basically it is the synoptic of a equipment in the field, can be controlled by this software. The user has several functions within it, being able to call,…
-
0
votes1
answer52
viewsQueuing Problems for Asynchronous Controllers
Hello, I’m having some problems regarding the Asynchronous Controllers, because the queuing of requisitions server keeps being locked to the client during some operation. The routines work exactly,…
-
0
votes0
answers371
viewsThread in Webbrowser c#
I need to use a thread that can work together with a webbrowser in c#. She just needs to execute the command, but as it is a visual component I’m not getting. Below I detail some attempts and…
-
0
votes2
answers646
viewsWhat is wrong with my Thread ultilizando Synchronized - Java
I started to study tread I saw some examples of java7 and java8 ultilizando lambda, I arrived in part to ultiliza the Synchronized that and to leave kind a wait list of threads where the next one is…
-
0
votes2
answers1357
viewsMulti threads c#
I would like to create a program to act multiple threads in a process, making it faster, that is, the threads working together to finish the service faster. But each one works individually in the…
-
0
votes1
answer265
viewsExecution in multiprocessors
I am researching about parallel execution in Python and I was left with a question that I have not found clear answer. Let’s say I want to multiply two matrices and add in a task list where each…
-
0
votes0
answers63
viewsSearch engine behaves equally using multi-thread or single thread
Good afternoon, I’m developing a routine for doing PDF file research. My idea is to distribute the search processing in each file in different threads to optimize the response time. The…
-
0
votes2
answers161
viewsHow to manage threads in C#?
I’m developing a project and I think I’m going to need multithreading. While starting a thread new doesn’t seem difficult, I can’t understand if I have to finish the thread or she ends up alone. My…
-
0
votes0
answers209
viewsHow to terminate socket within an infinite loop?
Hello, I created a server-client project using a socket that listens on the port and sends the element of a "Queue" until the queue has no more elements. However, when I close the client…
-
0
votes1
answer160
viewsAccess variable via exec
I was trying to create a "shell" to be able to communicate with a python program during its execution, so far I have the following (this code is just an example): import sys, pygame from threading…
-
0
votes0
answers124
viewsProgram uses the threading module but I didn’t notice any parallelism in the execution. What’s wrong?
I made a script to decrease the quality of some mp3, calling the ffmpeg program through the subprocess module. I added Threads thinking of doing the process in parallel to multiple files at the same…
-
0
votes2
answers47
viewsSocket does not receive or send message to the server
I am implementing a Java multi thread server that receives messages from clients and broadcasts them to others. But I’m having problems. The server only receives messages sent to users when the…
-
0
votes0
answers103
viewsMultithread system file writing in c#
I am developing a system in which I find myself in the following scenario: a program needs to create a file piece by piece. It receives bytes from a server and so the file is created, it should work…
-
0
votes0
answers39
viewsHow can I make one switch run in parallel with another?
I made this code for moving a character to a college assignment, but I wish that when I pressed the 'a', I could still walk and the ship wasn’t erased, just as I could press the 'a' several times…
-
0
votes1
answer241
viewsSplit Array into Multiple Threads
I need to do a Query in my Database, which will return each of the Lines. However, for each of them, during the Return, I need to wait about 5 seconds, because it is the time I need to wait for Ping…
-
0
votes2
answers261
viewsMultithread and Data Competition + Spring
I am rewriting a software that serves as a communication bridge between two services. Communication is done via sockets. The environment has high data competition, especially a list of active…
-
0
votes1
answer184
viewsmultiples Thread client, server using socket
Hello I’m doing a job for college and I’m doubtful how to add a new thread to add another client... basically what I want to do is after started the server is possible to send message from more than…
-
0
votes1
answer396
viewsHow to calculate the factorial of a list of integers using thread?
Given an A vector of size N with only positive integers, calculate the factorial of each of them and store the result in a vector B. To calculate the factorial, use the following function: def…
-
0
votes1
answer24
viewsVery fickle output in multithreaded application along with Exception
I’m seeing threads now and doing some experiments. It’s a simple test, I want to print on the console ten times the name of each thread by inserting into the same object of type List in a…
-
0
votes1
answer73
viewsHow to create parallelism in a specific multithreading?
My scenario is this:: Simulate a water tank associated with two taps: one used to fill the tank and another used to empty the tank. Rules: a) The total capacity of the tank is 2000 liters and each…
-
0
votes1
answer101
viewsPython - multithreading + csv
I’m trying to write csv files using a Thread for each file. Code iterates a list generated by groupby and calls a thread for each group. Calling the function directly files are saved normally:…
-
0
votes1
answer427
viewsPthreads, Buffer Consumer Producer Problem in C
The Goal of the program is to give in the command line nt=number of tasks that will be created , an integer n, and nbloco, number of interactions that each thread can have to calculate the sum of…
-
0
votes2
answers259
viewsC# - Can you run a task and return to the main thread later?
in the case the whole program is written without task and only one excerpt is with task, I wanted after that piece it returned to the "main thread". The code below is inside a for, and serves to…
-
0
votes1
answer134
viewsLoop to perform quantity processes in quantity
I have a size 30 list in python, I need to make a loop to catch 6 item from that run list, after we finish the 6 run over 6 and so on until finalizing the list. but I’m not finding a way to do that.…
-
0
votes1
answer155
viewsInteraction between Threads in Python, error message " Object is not callable"?
I am doing the interaction of 4 Threads, but when running them at the same time appears the following message: Object is not callable That is, the object cannot be called. How to fix it? Follow the…
-
0
votes1
answer232
viewsPython thread
To be very quick I’m trying to create 10 threads so that 10 attempts at a time are made, that is, from 10 to 10 so that the process is streamlined saving time and processing(maybe), my initial code…
-
0
votes1
answer35
viewsVariable synchronization in multiple Java Threads
Hello. My question is how to use the block Synchronized, my class Fileadapter has a method write who receives the Inputstream from the result of an HTTP connection I’m using to download a file,…
-
0
votes0
answers60
viewsHow to decrease running time using openmp
I wanted to know what I can do to decrease the running time using Openmp threads. I made a code to add the values of a size 2² vector, but the time measures are practically equal when I increase the…
-
0
votes0
answers19
viewsControl auto increment column logging in scalable applications in MYSQL
I’m putting together a scalable queue control app (e.g., queues for snack bars or benches). Passwords are formed following the standard Acronym + number. On the same day there cannot be a password…
-
0
votes0
answers61
viewsC# - Manipulation of controls in event triggered by a multithreaded method of another class
Good morning, you guys. I’m developing a C# library using Visual Studio for software authentication/licensing. It’s something simple. It basically consists of a method that executes a continuous…
-
0
votes0
answers74
viewsAnd python how to stop a specific thread (or all) in while loop
How to stop one, or all threads in python by ID (example) I’m developing a program that should run some loops looking for information in real time. However, when any of them find something the…
-
0
votes2
answers75
viewsLoop two functions at the same time
I would like to run two functions at the same time in Python, follow my code: import socket from pyftpdlib.handlers import FTPHandler from pyftpdlib.servers import ThreadedFTPServer from…
-
0
votes0
answers15
viewsFlask download multiprocess video
I’m doing a project to download videos from a website and store them in a folder on the computer. Here’s the thing, I got a route @app.route('/baixar', methods=['POST']) who is responsible for…
-
-1
votes1
answer183
viewsHow to do a while without locking the application in Java
I’m building an application in college that I need to run a code for 2 minutes and minute to minute to do an evaluation of the system and the variables that are in it. I’ve looked on the Internet,…
-
-1
votes1
answer209
viewsUsing threads in classes
Hello, I have a problem regarding the use of threads. Once I use mingw to compile my projects, and this header is not implemented, I use this header to compile my projects. However, I am having some…
-
-1
votes2
answers375
viewsCalling another class method in a Task c#
I’m trying to make a task call from a method of another Class: Diretorios diretorios = new Diretorios(); await Task.Run(() => diretorios.CopiaDiretorios(tbxVersaoAtual.Text,…
-
-1
votes1
answer176
viewsTraverse a vector by dividing the search into threads
Hello, I have a problem, I have a college assignment where I have a very large vector, where I have to get each processor thread through a part of that vector increasing the speed of the search, but…
-
-1
votes1
answer38
viewsThread problem in Backgroundworker
I’m learning how to use Backgroundworker now and I’m having this problem to access the information of some chekbox on Mainwindow, I’ve been researching about Dispatcher but I can’t quite understand…
-
-1
votes1
answer94
viewsHow do I know if my threads are actually running at the same time?
The doubt arose in a college job where we need to make use of threads in c. We have been asked to study the "libpthread" so we can get on with the job. The material I’m finding in my research does…
-
-2
votes1
answer244
viewsParallel scripts using Threading - Python
I’m trying to run parallel scripts in Python, using the threading library, but I’m not being able to apply it to my case. I believe the problem is to receive my function, but even creating a list,…
-
-5
votes1
answer37
viewsRunning dependent threads in parallel in python
I’m trying to run 2 threads simultaneously in my Python program: from threading import Thread import manipulateData import stream processo1 = Thread(stream.main()) print(processo1) processo2 =…