Questions tagged [multithreading] (527)

1
answer

How to subscribe to an event from a process and to address specifically the data process in python 3?

Welcome! Decided to learn Python. Tell me how to subscribe to an event data change in the process? I tried something like this: import multiprocessing as mp import logging import time def foo(q): i = 1 while True: q.put({'yndx': i}) time.sleep(1) i += 1 if __name__ == '__main__': mp.log_to_stderr().setLevel(logging.D...
monserrat_Litt asked April 19th 20 at 12:41
0
answer

The distribution of the array of threads in python?

Help please I can not figure out how to share an array between threads that each thread would have worked with your values and not take the values of other threads. For example: a = [1,2,3,4,.....10000] And there are 10 threads to make the threads worked in a place with this array and not taken already taken value? Library ...
esmeralda asked April 19th 20 at 12:18
2
answers

The distribution of tasks to threads with Python?

Hello! I have the following problem: I use 100 threads and throw the total file with strings. I need to make sure that streams are not identical to each other and brought the case to the end, my solution: from threading import Thread as th def bot(): global baza for i in chain: bi = i baza.remove(i) baza = ...
Benedict60 asked April 18th 20 at 13:35
1
answer

Like using cURL to send the data mnogopotochnoy?

I need to send simultaneously more than one thread using cURL the data to the server. One thread I did and works fine but can't figure out how to organize. One thread was made and worked. $ch = curl_init($url); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/rss+xml', 'Authorization: OAuth' . TO...
ryder_Huds asked April 18th 20 at 12:30
1
answer

Do you need multithreading in online chat?

Hello! Is there a website with a chat on HTML+PHP+JS+MySQL. With a large number of people (≈ 100), will there be noticeable delay when you run a PHP query to MySQL to display messages? Or does the meaning of multithreading? Hope I explained the question correctly and clearly)
eldridge41 asked April 16th 20 at 10:15
1
answer

How to run with a delay of ~2200 objects, each of which has its endpoint to query?

There is an online game that has the market. On the market 9 products with different characteristics. A total of 29 unique queries to retrieve data for all products for the market of one country. Only 74 countries. Total 2146 queries. Requests must be loaded at least 200-250ms between each. So it will take 7-9 minutes to ru...
yasmine.Schiller asked April 16th 20 at 10:09
1
answer

Why hung all the threads from the ThreadPool?

Good day to all. There is a WPF application that frequently uses a pool of threads. When one launches the application over a pool of threads and it stuck. The dump shows that the stream 931 are the backtrace: ntdll.dll!_NtWaitForSingleObject@12() KERNELBASE.dll!WaitForSingleObjectEx() kernel32.dll!@BaseThreadInitThunk@12() ...
Bridie_Fahey34 asked April 9th 20 at 10:10
1
answer

What's wrong with the stream?

Started getting acquainted with the streams and on the first attempt "feel" caught the error: (Compiler GCC 8.2.0) Imagine.cpp: In function 'void foo()': Imagine.cpp:6:10: error: 'std::this_thread' has not been declared std::this_thread::sleep_for(std::chrono::milliseconds(4000)); ^~~~~~~~~~~ Imagine.cpp: In function 'int m...
Maximillia_Renn asked April 9th 20 at 09:48
1
answer

Flow and drawing the shape?

create a stream, it throw the function of drawing the figure, after the thread calling the Start() method figure why something is not drawn, or rather it is drawn and immediately disappears, someone knows why ?
Joana asked April 9th 20 at 09:43
1
answer

How to run third-party java application from the main java application?

The question is a bit lamerskie, I apologize in advance. There is a need to create a java window application that has the button to launch the java app in a separate thread. That is, the java application is compiled in .java or to .jar application classes which are not spelled out in the basic java application. In other wor...
willis47 asked April 9th 20 at 09:39