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
-
1
votes0
answers46
viewsGet the Start Address from a process thread and finish it individually
What I want to do is open up to check if a process is open, see the thread list, identify it by Start Address, and finish a process-specific thread. I can do it manually by the processhacker, but I…
-
1
votes2
answers132
viewsDo I really need to start from a main to run a Schedule in java?
I am developing a web application, and now I have reached a point where I will have a process running in parallel in my application(in background) every day at a time x. To test the process, I made…
-
1
votes1
answer66
viewsProblem sending arrays from one method to another using Thread in Java
I’m doing a program that simulates sending a message from the physical layer to another physical layer of the OSI (ISO reference) model of networks. My code has a method that sends "frames"…
-
1
votes1
answer79
viewsDifficulty Working with Thread in Spring Boot
See how my controller is @PostMapping("/anexo") public DeferredResult<String> uploadAnexo(@RequestParam("files[]") MultipartFile[] files){ DeferredResult<String> resultado = new…
-
1
votes1
answer68
viewsCode review: Threaded server to handle multiple clients
The server with Threading: import socket from threading import Thread def Servidor(): servidor = socket.socket(socket.AF_INET, socket.SOCK_STREAM) ip = "0.0.0.0" porta = 8884 servidor.bind((ip,…
-
1
votes0
answers37
viewspython sigint and Ctrl c have different effects
Hello, I need to run an executable done in c,this executable performs operations on a board and writes to a file, the problem is that the write event occurs when the program receives a Ctrl+c. I…
-
1
votes2
answers301
viewsThread Issues in Java FX
Good night, I am having problems trying to implement a thread to my application, I always get the same error and do not know how to solve. When I run the application the first Thread takes effect,…
-
1
votes1
answer29
viewsLog activity for synchronization capturing task data running in background
I develop an application in Cordova, which synchronizes with an online database, the synchronization part is all in Java. (Context of the app) I am developing a "Log" screen for the synchronization…
-
1
votes1
answer89
viewsWork using Thread
I’m doing a college paper who has to be used thread. But I’ve never used it and I’m still learning it. My intention is, when you press the up key on the keyboard, startar to thread to make an event.…
-
1
votes1
answer88
viewsHow do I use threads or something in that code?
Guys I was needing to use the Threads (or something that doesn’t lock the program while the code doesn’t finish running) in that code, but always gives a different error, so I need your help. I was…
-
1
votes1
answer56
viewsProblem with Datareader together with Thread
I have a problem adding the returned data from a Select in the Datagridview. The problem actually occurs when I make use of backGroundWorker next to a ProgressBar. The specific code that performs…
-
1
votes1
answer62
viewsSet time variable on Back button
You guys, good night. I need a little help, I have the following code. Because I need to stop Thread when the back button is clicked. private void timeGame() { t = new Timer();…
-
1
votes1
answer113
viewsHow to change parameters of a class within a thread
I am initiating a class in the global scope, then I create a thread that alters a parameter of this class. After closing the thread I ask the class what parameter value I just changed, it tells me…
-
1
votes0
answers43
viewsthread superposition bug in python
Hello, I am studying the operation of threads and I made a program where there is a function that prints the current time of 'n' in 'n' seconds, and would like to create a parallel processing where…
-
1
votes1
answer379
viewsError filling Listview in a thread (Delphi)
In a mobile project I have a code snippet that fills a Listview with data from a Dataset (I’m not using Livebindings). Up to a certain point everything was working fine until I decided to add an…
-
0
votes1
answer114
viewsCode running in background on Google App Engine
I am making a "website" in GAE Java version to serve as a notifier when a source with results that I am waiting for goes online. You’re supposed to check the link in question every 24 hours. I…
-
0
votes1
answer114
viewsProblems with Thread on Android
I have a listview to be populated/fed by a webservice, but only load my images with a handler. I want to use a Thread, but only run with a Handler and I don’t understand why... Can someone help me?…
-
0
votes1
answer577
viewsCritical section problems in concurrent programming
I am implementing in C++ a system with threads using semaphores. I am with a doubt, if I treat the progress situation, I will guarantee 100% that my implementation will not occur no impasse? Or I…
-
0
votes1
answer234
viewsC# Mysql Connection thread-safe
I have a server that receives hundreds of asynchronous connections and I need to implement Mysql access from different threads. In fact, how I use the Async Socket Begin/End standard. Net, there is…
-
0
votes2
answers1834
viewsUpdating object value of a Form by a thread
I need 2 Abels of my form to be updated every 1 second, so I threaded it myself load of Form: Thread threadUpdate = new Thread(new ThreadStart(UpdateState)); threadUpdate.Start(); And my method…
-
0
votes1
answer347
viewsThread hanging
My system has a method that puts each event fired into one thread, save, edit, search, everything goes to one thread. backgroundWorker.DoWork += acaoProcessamento;…
-
0
votes0
answers33
viewsHow to get a variable Inside of thread?
I have a webservice Receiving data and Stores it in a String , how do I get this string Global variables doesnt work! Im using a traditional thread: new Thread() { public void run(){…
-
0
votes1
answer295
viewsHow to add a new Runnable to an Executorservice?
This is the first time I’ve worked with threads... The method below runs every 15 seconds by the EJB. I wanted that if there is SMS list in the bank it add to a new thread triggering these SMS But…
-
0
votes1
answer108
viewsProblem Adding Image Inside a Thread
I have this following call class inside the main is working perfectly only problem is for me to set the image I received in msg from the following error E/Androidruntime FATAL EXCEPTION: Thread-201…
-
0
votes1
answer234
viewsAllow only one instance
How to make my application run only 1 instance at a time? void Main(string[] s){ //faz algo }
-
0
votes2
answers2296
viewsRead multiple lines from a file in parallel with c#
I have a file with almost 700mb that has numerous lines with Json within it. I need to treat every json line-by-line and insert them into my database. The point is, today I’m using the following…
-
0
votes1
answer1086
viewsAndroid - Return method using thread
Hello guys I am developing an android application that uses the library Volley (google) to perform my requests http. I have a method that returns a Boolean and depends on the return of the request,…
-
0
votes1
answer352
viewsResolve android.os.Networkonmainthreadexception error in an android application that works as a client to receive images from a server
I’m trying to make an Android app that will fetch an image from the computer. Server-side code (computer) is already implemented and operational. Using UDP, I ask the server to send me an image and…
-
0
votes1
answer188
viewsWhat good is Runnable?
I was thinking of creating thread one in my software, but I saw through the forums that the Runnable help in a certain way in creating a thread, and wanted to understand how it works.…
-
0
votes0
answers2228
viewsjava.lang.Runtimeexception: Can’t create Handler Inside thread that has not called Looper.prepare();
What I must do to solve this problem ? private void callServer(final String method, final String data){ new Thread(){ public void run(){ asw =…
-
0
votes1
answer119
viewsDoubt with use of`pthread` in Posix
I am using the following routine with library command pthread.h: // // Declaração // pthread_t threads[NUM_THREADS]; // // Criacao // for(...) { pthread_create(&threads[i], NULL, MainTH, (void…
-
0
votes1
answer749
viewsHow to create loop thread in c#?
How do I create a thread that runs a function, wait 1 second and loop again until the program shuts down?
-
0
votes1
answer758
viewsHow to use Tanimate in Delphi
Hello, I want to use the tool Tanimate, but it has no animation in it, where I researched says it already comes along with the tool. Can you tell me if you have to declare something together? or…
-
0
votes1
answer788
viewsRunning a Method in the background Asp.Net/C# (Async or Thread)
What I needed to do was this Calling a Post Method Called Cadastrar Before this method finish I would call a new method called PessoaNotificacao However the method Registration would not wait for…
-
0
votes1
answer399
viewsPerform a task on a specific date and time
I’m trying to develop a small system that sends a e-mail every Tuesday at 08:00 in the morning. But I’m a little confused, I can already send the email and check if it’s Tuesday, but I don’t know if…
-
0
votes1
answer114
viewsDoubt about threads
I have two classes. One possesses a thread for the download of email attachments and the other has a thread for the conversion of files xml for csv. I started those two threads in another classe. To…
-
0
votes1
answer46
viewsJava: Sending messages over the network repeatedly in another thread?
This is my problem: I need a message to be sent by a socket repeatedly, to do this, I created another Thread, so that the application would not be locked, so: new Thread(new Runnable(){ public void…
-
0
votes1
answer108
viewsHow to know when a Thread has been completed
I have the following implementation javascript on the call of a Thread. I would like to print in the log the moment Thread was finished. That’s possible? func4 = { run: function(){ atv4(); } }; r4 =…
-
0
votes1
answer321
viewsRunning code snippets in parallel
Hello, I wanted to know how to run one thread after another for a certain time, for example: Thread x = new Thread(() -> { // qualquer código, pode ter até um while(true)... }); Thread x2 = new…
-
0
votes1
answer117
viewsListview and Aniindicator
If anyone can help, I have the following problem : I have two components in a form, a Listview and an Aniindicator, I am loading the Listview data into blocks coming from the database as per demand.…
-
0
votes1
answer615
viewsHow to recover the return of a function that was executed within a Thread in Python3?
I need to run a function through a Thread only I’m not sure how to recover the return of this function. Below an example of how I want to do: from threading import Thread import time def…
-
0
votes0
answers41
viewsI understand a parallel execution using _thread. Is there any more pythonic way to write the same code?
import _thread def filho(tid): print('Ola da thread', tid) def pai(): i = 0 while True: i += 1 _thread.start_new_thread(filho, (i,)) if input() == 'q': break pai() Is there any more pythonic way to…
-
0
votes1
answer57
viewsHow to get Thread Stack?
I’m trying to create a program to get the thread stack, like the image, someone has some way to get it?…
-
0
votes1
answer59
viewsI want to use 2 threads inside the foreach C#
I don’t have much experience in C#. But I’m trying to understand the code of a program I have here. Here use the following code: foreach(var item in _main.entrada) { .... } I want to include…
-
0
votes0
answers157
viewsPause program while executing a c#code
I am in doubt in the use of threads, I want that, in a given time, the program stops responding and only comes back when I determine... Example: System.Threading.Thread.Pausa(); // Executa código…
-
0
votes1
answer29
viewsParallel execution
I have a process running in my application for control. This process runs within a timer. private void timer1_Tick(object sender, EventArgs e) { // bloco de instruções 1 // bloco de instruções 2 }…
-
0
votes1
answer31
viewsuse Handle in textView
I am creating a chatbot and I want that when I send something, appear in a textview the message 'thinking...' for 5 seconds before sending the answer, I have studied about Handler, but so far I have…
-
0
votes1
answer58
viewsHow to make the prepareForWhy wait for a certain processing to finish to be called?
By clicking a certain button I make a query in firebase to return data, however this same button calls another view controller, and the problem is there, the view controller is called before the…
-
0
votes1
answer60
viewsDisplay runtime of an application [C#]
I would like help with a process I need to do: The idea is to create an informative label that will contain as many hours, minutes and seconds as my application is working. Time starts to count as…
-
0
votes1
answer65
viewsWhat is the main difference between Thread.Abort and Thread.Finish?
I started working with threads recently and came across the need to close a thread, eliminate it altogether. After some researches I discovered the methods Abort and Finalize, however I did not…