Questions tagged as 'multithreading'

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
4
answers

What are the main differences between Handler, Thread and AsyncTask? [duplicate]

The documentation for Android may end up being a bit confusing for those who are starting to understand better what are the differences between Handler , Thread and AsyncTask . Handlers are background Threads...
asked by 25.08.2015 / 13:20
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
2
answers

await Task.WhenAll how to run multiple processes?

I am trying to create several task (async) they will execute the following logic: Parse an Html based on a url received with the HtmlAgilityPack Return a product model after parse Insert the Product into the database Download product i...
asked by 11.10.2016 / 20:36
1
answer

Are there differences between the terms Thread, Multithread, Async, and Await?

I asked this question here in Stack Ooverflow: What is the solution for asynchronous processes in PHP? I did this because I wanted to, in the middle of a process execution, want to have a certain call of a function running on the other p...
asked by 29.05.2017 / 13:35
1
answer

Task.Run always starts a new Thread?

When executing a list of tasks started through Task.Run, is it guaranteed that each one is executed on a different Thread? When reading the documentation, it seems to me that this is the default behavior, while doing the tests I was validatin...
asked by 10.08.2016 / 21:43
2
answers

Difference between BackgroundWorker and Task.Run

Generally when I had to do some operation in background , mainly involving progress bar update or labels I used BackgroundWorker , with its events WorkerReportsProgress and DoWork . Recently I came across the source of a...
asked by 31.10.2016 / 17:48
2
answers

Is it safe to use List with Parallel.ForEach?

I'm doing a doing a crawler style method that takes a string list, makes a call to a website, inserts the return into another list, and returns. My method is working, but it is very slow so I want to parallelize the calls. I searched for...
asked by 18.05.2016 / 23:40
2
answers

How to make a ScheduledExecutorService launch a new task while the previous one is not yet finished?

I'm implementing a scheduler to run some threads on my system at x time intervals. The big problem is that if thread 1 still has not finished running, a 2 does not start, even its time having arrived. In the example below I "forced" this erro...
asked by 05.07.2018 / 21:34