Questions tagged as 'multithreading'

1
answer

What do the terms Cpu-time Wall-clock-time mean?

Some documentation (programming) refers to these terms when there is some kind of limitation on CPU usage, for example:    Background tasks are limited by the amount of time   use of the wall-clock .       Background tasks are limited to...
asked by 05.03.2017 / 15:14
1
answer

For nested in parallel

I am trying to rotate two% nested%. The second would like it to be parallel. Follow my code. for (int i = 0; i < original.Width; i++) { Parallel.For(0, original.Height, j => { Color originalColor = origina...
asked by 02.12.2016 / 13:26
1
answer

Nested for thread conversion

I have the following% nested for that runs the entire length of a bitmap image in C #. I would like to run the second for threads to run parallel. Bitmap alterado = new Bitmap(original.Width, original.Height); //Convertendo para to...
asked by 01.12.2016 / 19:11
1
answer

How to "generate" multiple TCP clients using Threads in the same script?

I wrote the code for a simple TCP client: from socket import * # Configurações de conexão do servidor # O nome do servidor pode ser o endereço de # IP ou o domínio (ola.python.net) serverHost = 'localhost'#ip do servidor serverPort = 50008 #...
asked by 17.08.2016 / 21:31
2
answers

how to exactly use sleep and wakeup in python3? (multithread)

Hello, I'm trying to make the famous producer / consumer problem in python3, transcribing it from my OS book, but I've been experiencing a problem, apparently wait () or something like that, because simply after the first time the threads run...
asked by 02.07.2015 / 01:25
1
answer

How do I know if the app's Web Service is down?

Scenario: The app consumes data from a web service, so that the app is not "locked" I added the task of downloading the data in a secondary trhead, according to the following code: dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORI...
asked by 02.11.2014 / 13:51
0
answers

Register "https" protocol with certificate for SOAP request (Axis 2)

I created a service to register the "https" protocol and inject the certificate into it using the SocketFactory implementation, but only one request works fine at a time, but when using multi-threading it does not work, certificate at the time o...
asked by 15.06.2018 / 16:58
0
answers

Program uses the threading module but I did not notice any parallelism in the execution. What's wrong?

I made a script to decrease the quality of some mp3s by calling the ffmpeg program through the subprocess module. I added Threads thinking of doing the process in parallel for several files at the same time. The program works but I have seen NO...
asked by 10.04.2018 / 02:14
1
answer

Solution to the Unisex Bathroom Problem in Python [closed]

Suppose you are at a party in the Public Calamity republic that has only one bathroom with n boxes, where box is a compartment with a toilet. The rule of the republic says that the bathroom can be used by both men and women, but not at the same...
asked by 06.12.2017 / 00:45
0
answers

Multi thread chat

I'm developing a bot chat, the question with the answer that the bot gives is all right, my problem is when more than one person contacts the chat, he is treating as if both were one, I I believe the problem is in the way that I am handling the r...
asked by 13.03.2017 / 21:11