Questions tagged as 'hilos'

1
answer

Use Activity.runOnUiThread () or Handler.post (Runnable) to update the main Thread?

Very good, I have a question related to when I have to use (or why) Activity.runOnUiThread () instead of, or vice versa Handler.post (Runnable) strong> to update for example a TextView or ProgressBar , or alternatively, I should use Asyn...
asked by 08.06.2016 / 13:08
2
answers

Thread concurrency problem. Thread Race Exercise. JAVA

My problem is as follows, I have a runner class, the only thing he does is a method run (thread) that simulates the distance traveled and is saved in the variable distance that is a summation of the result of the Math.Random();...
asked by 26.04.2018 / 19:43
1
answer

A canvas control is frozen

Working with Visual Studio 2015, WPF I have a Canvas control which serves as a canvas to draw a skeleton that I get by scanning through the Kinect device when I get in front of the device my skeleton that appears on the canvas freezes. I trie...
asked by 09.11.2017 / 22:23
2
answers

Is it possible to run a servlet from a Thread class?

I'm doing a web application with JSP. This application has to show the result of a query in a table. The difficulty is that this has to be shown when the application is opened (url), without pressing any button. I thought about doing a Thread th...
asked by 14.06.2016 / 22:57
1
answer

Upload files to S3 using Multithreading in Python

I have a folder with thousands of files to upload to my S3, for now I do it like that, without problems: for x in images_full_path: data = open(x,'rb') name_file = os.path.basename(x) s3.Bucket(bucket_name).put_object(...
asked by 11.07.2017 / 18:15
1
answer

Multiply matrices using the thread API in JAVA

I have never worked with threads and this will be my first time. How can I multiply two matrices using the thread API in JAVA? So far I have the code to create and multiply the matrices: public class main { public static void main...
asked by 11.10.2017 / 22:12
1
answer

Access another class via threads in Android Studio?

Hello I have a project in android studio which saves the user's location (longitude and latitude), for this I have created a series of methods in a single Activity, now what I need is that when the user changes activity I follow saving the locat...
asked by 13.08.2018 / 20:00
2
answers

Java - Problem with conditional

I have the following code: public class UnitatFamiliar extends Thread { Comandament comandament; public UnitatFamiliar(Comandament c) { comandament = c; } @Override public void run() { //Agafa el coma...
asked by 08.03.2018 / 16:00
1
answer

Doubt Threads in C #

Good morning I am studying C # and I have found the need to make my program pause, until x seconds pass or until the same user generates an event. I tried to transfer my knowledge of java threads to C # but it does not work correctly. My questio...
asked by 03.11.2018 / 09:43
1
answer

Several threads in c #

Hi, I'm making an application where I need to run a call to an Api in the background: Main{ Metodo(); } Metodo(){ for(i=0,i<100,i++){Metodo2(i) } Método2(int i){ apiThread2 = new Thread(() => LlamadaAUnaApi); apiThrea...
asked by 16.05.2017 / 16:40