Questions tagged as 'thread'

1
answer

java.lang.NullPointerException in this code

This is giving java.lang.NullPointerException error in these two classes. import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.JTextArea; import javax.swing.JTextField; public class PrimosPanel extends JPanel { priva...
asked by 09.12.2014 / 11:22
1
answer

Dependency Error

I'm using BackgroundWorker private BackgroundWorker BGWorker = new BackgroundWorker(); BGWorker.DoWork += BGWorker_DoWork; BGWorker.RunWorkerAsync(); private void BGWorker_DoWork(object sender, DoWorkEventArgs e) { ObterInformacoes(...
asked by 05.03.2015 / 19:25
2
answers

Draw a pixel-by-pixel image

I'm trying to do a beast program but I can not do it. I want to redraw a pixel-by-pixel image randomly, doing this with multiple threads. I do not handle much of Java Swing, so I'm beating myself a lot. I did some research before postin...
asked by 09.10.2014 / 15:23
3
answers

Wait for Thread to finish to proceed with the code - Delphi

I'm facing a problem in an application I've developed. It is an automatic updater that basically downloads the necessary files and extracts them in a suitable way. The problem is time to download. I put the download method inside a Thread, put i...
asked by 18.04.2018 / 16:03
1
answer

onSpinWait Java 9

I'm porting a Java 8 to 9 application, I have some processes that use the Watchdog concept, which use something similar to: public synchronized void run() { until = System.currentTimeMillis() + watchdogParam.getTimeout(); while (!can...
asked by 24.10.2017 / 19:15
1
answer

Thread Pool Example in delphi

How do I make a pool of Thread , I need to execute a process that contains several records, but I need to send on demand, send 10 and as I release it, send more ... how can I do it? / p> I've set an example ... unit Unit1; inte...
asked by 13.06.2017 / 14:16
1
answer

How to avoid request blocking?

I'm doing a project in ASP.NET MVC + IIS and I realized that when I made a request to a page with a long read in the database Entity Framework ), if I open another window and try to access another page of the site (the Home for example, wh...
asked by 21.04.2017 / 17:36
1
answer

Thread - How to call a form inside a Thread iTask?

In Delphi 10.2, I have a Form A that has a "Task-A" TTask that triggers a StoredProcedure in the Oracle database with Firedac. The StoredProcedure updates a result table that will be used by a form B which has a graph. I would like to call Form...
asked by 08.10.2017 / 05:54
1
answer

Start a thread again

I have an event on the start button, every time I load, 3 threads are started that start counting from 30 to 0, which reaches 1 to 0 wins. But however I reload the start button a few times and the count starts at 30 and does everything the same,...
asked by 14.10.2016 / 01:06
1
answer

Routine included in ThreadPool to run in "background" does not let the application continue running

I have the following code snippet in a method of my ASP.NET MVC application that tries to delete the directories and their files. // efetuo processos de remoção de arquivos do banco de dados await Context.SaveChangesAsync(); var itens = diret...
asked by 06.04.2016 / 18:37