Questions tagged [concurrent-processing]

[CONCURRENT] processing, in sharp contrast to a [PARALLEL] processing, has no specific requirements on when to start, where & in what particular order to execute and when or how to finish a set of tasks, that got a chance to be executed in a free flowing, uncoordinated fashion on a subset of available resources.

In a "just"-[CONCURRENT] process orchestration, the code-units (be it tasks, threads, programmes... ) may but, need not, appear to get executed in some non-[SERIAL], overlapped in time, fashion or simultaneously (just by coincidence), all that by using more than one CPU or processor core and other shared resources to execute a program or multiple computational units.

A "just"-[CONCURRENT] process orchestration does not warrant any mutual coordination, the less a synchronicity a True-[PARALLEL] warrants by definition.

A "just"-[CONCURRENT] process orchestration enables more things to happen con-currently, the process-scheduler and other constraints participate in evaluating, who gets "elected" for such a con-current processing and who not.

68 questions
0
votes
1 answer

Python: parallel processing and tkinter

I am trying to implement a piano game. The rules are simple: a note is played and after 5 seconds the answer is shown. The problem is that I want the user to be able to play the notes while the program waits for those 5 seconds. Right now the…
0
votes
0 answers

how to run multiple docker containers so that each container run the same applications/functions but with different arguments

I have a python script doing data processing. On laptop, it probably takes 30 days to finish. A single function is being executed through a for-loop for hundreds of times. Each time a new argument will be feed into the single function. I am thinking…
0
votes
0 answers

Move GIF while python pool process is executing in parallel with pyqt5

I want to update the GIF while pool process are executing in parallel. Now GIF is getting stuck, it is responding with respect to progressbar value update. I want GIF to execute independently. I have tried using it thread but that is not solution…
shivangi
  • 1
  • 2
0
votes
0 answers

Creating a sound recorder script in Python. How could I continously record (10 minutes files) while also converting completed files to another format?

I have a bit of experience in web development, Javascript & its most popular frameworks, but I'm a huge noob in Python and "offline" development. I'm trying to create this sound recorder script for Windows that would essentially record all day (for…
0
votes
1 answer

How to pass an object to a process created using Multiprocess.Process

I have a image-processing service containing two methods, which I want to execute in parallel using the multiprocessing library in Python. The first-method does an api call in order to fetch image metadata from an external service. The second method…
0
votes
0 answers

How to open a process and don't wait for it to finish?

I need to open a few processes (which are unrelated to Python) to run concurrently to the Python-interpreter ( which launches them, but does not wait for them to finish to continue its own code execution). Ideally, I will give a callback function…
user16009754
0
votes
2 answers

In concurrent programming is it possible that, by using locks, a program might sometimes use more processors than are necessary?

This is an exam question (practice exam, not the real one). It's about concurrent programming using a multi-core processor and the problems with using locks. "In concurrent programming is it possible that, by using locks, a program might sometimes…
0
votes
1 answer

How to improve my concurrent processing time in this code?

I have programmed the following code in Python: from concurrent.futures import ProcessPoolExecutor, \ ThreadPoolExecutor, \ as_completed import random import time def addS(v): s=0 …
Little
  • 3,363
  • 10
  • 45
  • 74
0
votes
1 answer

Can I create a "global", fully connected graph in python, being concurrently updated from concurrent workers in a Pool.map() processing?

I want to build a fully connected graph parallelly in python and also get a list of edge values like :( node1, node2 ) = edge_valuestored in a dictionary format : { ( node1, node2 ) : edge_value [, ... [, ... ] ] } To do this I have first to…
0
votes
1 answer

Schedule a Job to be done after every 5 seconds in Python(Kivy)

I Want to schedule a Job to be done after every 5 seconds which takes around 3 seconds to execute. I have used kivy.uix.clock.Clock.schedule_interval(my_job, 5) and def my_Job(): # Job Statements time.sleep(5) my_job() my_thread =…
Ahmad Raza
  • 1,923
  • 2
  • 14
  • 19
0
votes
3 answers

How to download multiple datasets in parallel?

i was trying to download 1700 (company) datasets of stock market to csv files using yahoo finance, and it is storing them successfully, i did it using while loop, i ran, while loop till 1700 times and it almost took more than 2 hrs, can i use…
0
votes
1 answer

Why is multiprocessing module not producing the desired result?

import multiprocessing as mp import os def cube(num): print(os.getpid()) print("Cube is {}".format(num*num*num)) def square(num): print(os.getpid()) print("Square is {}".format(num*num)) if __name__ == "__main__": p1 =…
0
votes
0 answers

Python2: can I parallel a for loop to move data from Mongo DB?

I am using a function to migrate data between mongo and oracle. This function takes as input 3 arguments: the connection to mongo, the connection to oracle and the entity of the mongo database which I am using as key in mongo. I am looping through a…
0
votes
3 answers

How to ensure processing order in parallel streams?

I am looing to ensure order in parallel streams based on some field value. Maybe I will introduce some abstract example: Let's say we have class User @Lombok.Data() class User { private String firstName; private String lastName; private int…
Kerdac
  • 47
  • 3
0
votes
0 answers

How to convert PDF-files to PNG-images concurrently?

I have a scenario, where I need to convert multiple PDF-files to PNG-images concurrently. Although it can be doable using Java 8 Parallel Streams, I need it to be executed on Java 7. This is the snippet which I use to convert PDF to PNG without…
origin
  • 120
  • 2
  • 8