Questions tagged as 'thread'

1
answer

Problem in thread execution, using flags

I'm having problems understanding the code completely because I'm new to using java in thread. What code will do is to control the flow by doing 55 iterations by dividing the thread and main program: Resultado: Main Thread.: 1 New Thread..: 2...
asked by 08.04.2014 / 00:35
1
answer

Threads in Java

I have a multi-threaded system in Java that uses the ThreadGroup class that is deprecated. With my current implementation I also can not "kill" a thread in lock. How to implement efficient code to control Thread in Java? I ne...
asked by 13.03.2015 / 19:11
1
answer

Python Chat - Errno 9 - Bad File Descriptor

I am developing (for study only) a code for a python chat, and I came across an error during the client-server communication, I would like some guidance about it, since I can not identify a solution. Here is the code and the image of the error....
asked by 22.11.2016 / 17:58
0
answers

Thread in WAIT state [closed]

I am monitoring a system that has been done in Java and at certain times during the day most threads, about 95%, enter WAIT state and wait for about 50 seconds on average, and sometimes the interval between pauses is 5 minutes. The result is tha...
asked by 24.06.2016 / 15:47
1
answer

Thread Synchronization in Java (synchronize collections)

I have set a Thread in Java in which I want to simulate airplanes arriving and departing from the airport, class Aviao contains only number and 10 passengers public class Aviao { //numero de Aviao private int numeroAviao...
asked by 28.11.2015 / 23:52
1
answer

Difference in thread execution in Java

See the execution of two similar programs in Java. One inherits from Thread and another implements the interface Runnable : Program 1: public class PingPong extends Thread{ private String msg; private int delay; PingPong(Strin...
asked by 29.05.2016 / 15:41
2
answers

How to add parallelism in execution with the subprocess module?

The code will be used on 2 virtual testing machines (Linux and Windows). The code below works, but every time I run a program, for example notepad , the prompt gets stuck until I quit the program. How do I run multiple programs at...
asked by 03.08.2016 / 17:41
2
answers

Execution of programs in halt WITHOUT use of Threads

Ask me to build a Java program that runs parallel programs ( ls , firefox ) that are contained in a file. I already have the following code: File file = new File()'; List<String> lista = file.readFile(args[0]);...
asked by 21.11.2017 / 13:32
1
answer

Problems with thread

public class ThreadTest implements Runnable { private String word; private long time; public ThreadTest(String word,long time){ this.word = word; this.time = time; } public void run() { try { for(int x = 1; x <= 15; x++)...
asked by 31.05.2014 / 19:44
2
answers

What is the maximum number of threads supported by Java EE?

I am analyzing how to rewrite the architecture of a Java program would like to know how many threads the scheduler supports? or how can I infer this amount based on the processing power of my PC / Server / Cluster?     
asked by 08.09.2015 / 03:02