Most voted "thread" questions
Thread (Thread) is a sequence of programmed instructions that can be managed independently by the OS process scheduler.
Learn more…388 questions
Sort by count of
-
0
votes1
answer41
viewsHow to pause a Notification progress?
There is a Progressbar in my notification that works like this: new Thread( new Runnable() { @Override public void run() { int incr; // Do the "lengthy" operation 20 times for (incr = 0; incr <=…
-
0
votes2
answers720
viewsDelphi - Thread exception handling
I wrote a thread on Delphi with exceptions treatment, but when the exception happens the operation is aborted and does not fall into the except block. Is there any specific treatment of exceptions…
-
0
votes0
answers23
viewsHow to identify whether an npm package is thread blocking or not?
I’m using the package Adm-zip on a project in node.js. I wonder if this package blocks Event loop and how I could identify packages that are thread-bloking or not.…
-
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
votes0
answers57
viewsphp class Singleton thread type
I have a class that accesses the service layer of my application. This class is a Singleton. Through the service, it accesses the data in a uniform way, so that my application has the expected…
-
0
votes1
answer683
viewsC# Return Value of a Thread
I created a database connection class that I intend to use Thread to make queries faster. In office ExecutarSelect and ExecutarSQLPiece I have returns, but I couldn’t get those returns through the…
-
0
votes1
answer2375
viewsSocket/Threads (Client/Server) Java
I have a very cruel doubt. I did a lot of research and found nothing similar to solve my case. What I need is this: Customer side sends card number and purchase value The server side receives this…
-
0
votes1
answer694
viewsEnding Two Threads with Progressbar in C#
I’m making a ProgressBar file conversions, each converted file is updated to ProgressBar with a percentage of total files to be converted. I read in a tutorial how to do the ProgressBar, work with…
-
0
votes1
answer63
viewsKeeping the context of a List out of Thread
I wanted to upload the list to Thread and then have access to it after the action is over. You have this code but at the end of the thread the list is null; someone would have a tip to help me?…
-
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
votes0
answers637
viewsProblem closing thread application inside a component
I am developing a component (visual indicator) that to search the data in the database and generate the indicator itself uses a Thread. This Thread is inside the component itself. It works fine,…
-
0
votes1
answer397
viewserror: invalid use of Undefined type 'struct Fila'
I’m implementing a queue to control the threads created, in C. So as the thread is not the first in line she waits to be finished. example: // // Enquanto não é primeira da fila // while(idd !=…
-
0
votes1
answer1081
viewsProblem with file transfer via java socket
I am trying to make a client/server program that accepts more than one client and that client sends files to the server. The transfer was working properly, however when I put a while so that when…
-
0
votes0
answers54
viewsHow do I match a value of an array with another value in another array in Java?
I know how to get the value of an array position and compare the array values. As code below. for (int i = 0; i < listadosWifi.size(); i++) { /* pega o SSID e o BSSID */ providerName =…
-
0
votes1
answer84
viewsHow to make Requestcontext thread-safe?
In one project I am using the component "Demoiselle-Scheduler-Quartz". In this project several threads are fired and executed concurrently. The "Demoiselle-Scheduler-Quartz" component injects the…
-
0
votes1
answer207
viewsInsert data into a real-time text box with Timer
I’m using timer as follows: System.Timers.Timer aTimer = new System.Timers.Timer(); aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent); aTimer.Interval = 1000; aTimer.Enabled = true; In the…
-
0
votes1
answer98
viewsMediaplayer and Thread
Good night, I have an Activity in which I play a bell x times, for t time, and for that I use a Mediaplayer inside a Thread, as below: public void tocarSino(final int repeticao, final long…
-
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
votes1
answer164
viewsProblem disabling Backgroundworker
I am creating in my main form a Backgroundworker object and I have two click events, one to activate and the other to disable the backgroundWorker, but the method to disable is not working.…
-
0
votes1
answer52
viewsThread does not run
Adding Breakpoints I could notice that the Thread below is not executed. I search the typed zip code using HTTP, returning a JSON, via the viacep.com webservice. if (cep.length() == 8) { final…
-
0
votes1
answer77
viewsException error in thread "main" in my Array
Guys, help me, I can’t find the error in my code. I know this error refers to not having the position in the array to store but I don’t know where to fix it. package…
-
0
votes0
answers153
viewsJava programming with threads
Staff need help for an activity: Consider three vectors of numbers. Write a program to print out the largest Twin Primes numbers in each vector. Which are the largest twin prime numbers considering…
-
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
votes2
answers110
viewsHelp with threards system
I wrote a small application in C#, where its main process takes a long time to run. I am having a problem with the lack of response of the graphical interface of the application while running this…
-
0
votes0
answers96
viewsSearch using Thread
I am looking for files using threads, the code I developed looks for the right file , but it turns out that it does not finish the execution when it finds , or if it does not find it continues…
-
0
votes1
answer103
viewsHelp with Subprocess and Thread
I made a code that each subprocess call is executed by a different Thread, but they execute the same method with same parameters. You could call these subprocesses using Thread but passing different…
-
0
votes1
answer36
viewsI cannot display the value received from the server
I am working on a project written in Java with a Client structure - Server. My client consists of Swing Graphical Interfaces and the server working with multi-threads. But I’m at a point where I…
-
0
votes1
answer379
viewshow to hide a progressBar after given time
I’m using the following code new Thread(new Runnable() { public void run() { while (cont < 100) { cont += 1; try { Thread.sleep(20); } catch (InterruptedException e) { e.printStackTrace(); } }…
-
0
votes0
answers62
viewsReal-time Audio Processing on android: Thread or Asynctask?
I’m starting to develop an android app that will "listen" to the audio and will draw its waveform on the screen. But the first step I wanted to just "listen" to the audio and show on the screen the…
-
0
votes0
answers61
viewsWriting in Textbox freezes form
I have a form that has a Textbox and would like to write in it but give an effect of Typewriter so that the text is not added fully "dry". I created a method that takes the text I’d like to add and…
-
0
votes1
answer94
viewsMethodinvoker does not update listbox C#
How to implement a timer that updates a listbox in c every cycle#; Method to create the timer: private void CriaTimer() { System.Timers.Timer aTimer = new System.Timers.Timer(); aTimer.Elapsed +=…
-
0
votes1
answer183
viewsHow can I for timers who were initiated by a task c#
Hello, I’m trying to understand a situation but so far I haven’t been able to solve it. Imagine that we have an X class that has a timer that is started by the constructor. Now imagine that this…
-
0
votes1
answer36
viewsConnection only works with manually set values
I have a Socket class that is working normally this way: class Socket(): __ffChatSocket = "" __meuTelefone = "" __WhatsappAPI = "" __dest = () def __init__(self, telefone, WhatsappAPI): ip =…
-
0
votes1
answer762
viewsUpdate Textview Android Using Handler
I started Programming now on Android, and I need to update a Textview after receiving a string from a Socket connection. I get the string correctly but the apk closes giving an exception: 10-01…
-
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
answers536
viewsRunning threads on android
I’m new at work with threads on Android and I’m having difficulties to implement them. To thread will be used to make a calculation and finally send an email depending on the result of the…
-
0
votes1
answer554
viewsHow do I get more memory to run the app?
I’m developing an app android Currently, when running the APP, it starts by reserving 36.62 MB of memory. I would like it to start over 50.00 MB or, when it reaches its limit, add more memory. Is…
-
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
votes1
answer543
viewsHow can I kill a Thread
I’d like to know how to kill a Thread. public class thread { private static void metodo(){ new Thread(){ @Override public void run(){ while(true){ System.out.println("Executando..."); try {…
-
0
votes1
answer237
viewsHow to add elements in Queue (Queue) continuously?
Below I have a code that he needs to do the following: Create a thread, then start it. When starting the thread, according to the time (random time) the program adds a value in the queue, after…
-
0
votes1
answer361
viewsJava FX - Threading Issues
Good morning, I would like to sanction a question that is disturbing me, as I do to edit a Label from a Thread using a button? Whenever I run the code I get an error, but if I run this same code…
-
0
votes1
answer51
viewsProblems with Thread (Koltin)
I am in a situation where I am building an APP for android to be consulting the Bitcoin price variations on the website Mercado Bitcoin. The APP is already working, the last thing I want to…
-
0
votes2
answers929
viewsHow to use async/await in void return methods?
I have a problem in my application, where due to the large volume of processing, my Form lock. During my researches I found that a method async resolves this, however the functions performed on my…
-
0
votes1
answer782
viewsPython asyncio and threading
I’m studying the module asyncio of Python and there is the function run_coroutine_threadsafe which should be executed in a different thread than the event loop. Follow my script: #!usr/bin/python3 #…
-
0
votes2
answers107
viewsProblem with C#Threadstatic
I own a system where his authentication keeps a token in a Threadstatic property. It turns out that Monday, he started distributing the tokens incorrectly (after windows server update). I made the…
-
0
votes0
answers385
viewsChat with multiple customers using Threads and Sockets
The code here posted represents a small chat between client and server. As I said, I’m not familiar with threads. The teacher told us, from this code, to create a multi-client chat, where clients…
-
0
votes1
answer352
viewsHow to make server threads in Python?
Hello I’m a beginner in Python and I’m creating a simple server but I can’t create independent threads. When the client connects to the server it calls the worker function that waits for a client…
-
0
votes0
answers258
viewsHow to create a Thread in Spring Boot?
I am starting a file upload file application, where saves the path in the database and the image on the server, when performing a test can send the image to the folder, now I need to be able to…
-
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
votes1
answer243
viewsHow to add Sender parameter in thread onterminate?
I have a thread that performs a action and in onterminate performs a secondary process. It works that way: procedure qualquer; var Thread: TThread; begin Thread.CreateAnonymousThread( procedure()…