Questions tagged as 'hilos'

3
answers

Create threads within a cycle

I have a problem I can not understand how to create threads within a cycle and that they all run simultaneously, and when all the threads are finished, send a message. I have this code: for (int i = 0; i <= x - 1; i++) { if (File.Exi...
asked by 23.03.2018 / 19:08
1
answer

Stop threads in Java

In summary mode, the result I get now is: Miembro_X esta mirando el canal ... Miembro_X esta mirando el canal ... Miembro_X esta mirando el canal ... Ja nadie mira la tv. Code: CASA CLASS: public class Casa { public static void ma...
asked by 28.02.2018 / 20:56
2
answers

How to pick up a thread when it falls?

I have a thread that controls another thread, the problem is that I need the other thread to restart every x time and when I try to start it again I can not make it start.    System.Threading.ThreadStateException: 'Thread running or terminate...
asked by 30.10.2017 / 12:53
1
answer

Random speed on Java threads

I have done a small program simulating a race with three threads. My idea is to put these speeds with randoms number so that the result varies, but I do not know how to do it. Code: public class Carrera extends Thread { String nombre;...
asked by 28.10.2017 / 18:12
1
answer

use threads and when compiling do not use -l pthread

Hi, I'm doing a program in linux with threads and when I compile I should use gcc .... -l pthread to work my question is how can I do so that I do not have to be putting the pthread always simply compile as gcc -or test test.c I hope you unde...
asked by 13.06.2017 / 08:30
1
answer

Kill thread in Android execution

I have this method where when you press the back button of the phone kills a thread that is running in the activity that you want to back out. Class that calls I have initialized the thread: //Declaras una variable tipo Thread public Thread...
asked by 28.05.2017 / 20:19
1
answer

C # Progress Bar, Thread, Nested Foreachs

Good morning ... I have the following situation: I have two lists, the first of about 9000 objects, and the second of 44000 (this can vary from one execution to the next). Now, I have to find each item in list A in list B, set a couple...
asked by 15.06.2017 / 20:45
2
answers

Check thread asleep from another thread

I have a problem with the java threads. The issue is that I have a thread that runs every 10 minutes, but it takes a few times to execute X times, and other times And, so to speak. They can be 5 seconds, or 7 or 10, you do not know. The issue is...
asked by 30.05.2017 / 12:44
1
answer

Handling Threads in a DataGridView in VB .net

I am automatically and manually updating a datagridview with data every so often. For this, I delete all the rows and insert them again manually with programmed data. I do not use any database or table. The problem is that I'm with a thread t...
asked by 28.12.2016 / 20:50
1
answer

Problem when running a chat in java

I am doing a java chat that goes from one point to another and I have an error when executing both. When I execute them one by one there is no error, but when I do it simultaneously it throws a'NullPonterException 'exception and when I want to c...
asked by 31.01.2017 / 15:34