Questions tagged as 'multithreading'

2
answers

How to use multithreading with arduino

I'm making a doorbell with arduino. This bell will be composed of: 01 Arduino ONE, 01 Buzzer, 01 Transmitter 433 Mhz, 01 Receiver 433 Mhz. My question revolves around how I can handle the listener who will be listening the controls...
asked by 09.02.2015 / 02:56
1
answer

Using WaitAll in C #

I have the following problem: A program generates two types of threads A and B through clicks on their respective buttons. Both types can not run at the same time. If I have 10 threads A, B can only execute when 10 of type A ends. I can re...
asked by 15.12.2014 / 01:08
6
answers

Log System losing data, how to use Threads?

I currently have a mid-level system where I need to record detailed Log of everything that happens in the system, the Company that is divided into Departments audits everything that happens through Log! I have a simple Procedure that a...
asked by 31.10.2015 / 12:06
2
answers

Async / Await with threads (C # 7.2)

I have this code and as you can see I created two examples, Parallel and NotParallel. I was hoping that both of them would return me 3000ms, as both should run async (2000 and 3000) and the total time would be 3000, but the NonParallel, is ta...
asked by 20.04.2018 / 14:24
2
answers

AsyncTask x MultiThreading

When it is more advantageous to use AsyncTask, and when to use Threads. For example: Home Download some file (ex: JSON). Which would be more advantageous in this case and why ??     
asked by 06.05.2014 / 14:58
1
answer

Why is a FOR of the loop faster than 10 FOR together

I made a for alone count to 1000000 (sending 1 message to each loop ) and it took 14 seconds. public class main { public static void main(String[] args) throws InterruptedException { long init = System.currentTimeMillis();...
asked by 07.07.2015 / 03:46
1
answer

C # Parallel.ForEach equivalent in JavaScript

I'm trying to write methods with behavior similar to Array.prototype.forEach and Array.prototype.map , but using multiple threads. For Array.prototype.parallelMap , I did the following: Array.prototype.parallelMap =...
asked by 19.01.2016 / 21:24
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

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