Skip to main content

All Questions

0 votes
0 answers
103 views

Python AsyncIO, multithreading and multiprocessing performance

I'm actually trying to speed-up a piece of code that is writing thousands of small files. My first idea was to use asyncIO, as writing file is a blocking I/O. I also thought it could be interesting to ...
julpw's user avatar
  • 11
2 votes
0 answers
400 views

Concurrency: multiprocessing, threading, greenthreads and asyncio

I'm currently working on Python project that receives a lot os AWS SQS messages (more than 1 million each day), process these messages, and send then to another SQS queue with additional data. ...
Igor Mendes's user avatar
1 vote
0 answers
148 views

Can't get Asyncio to run 2 tasks in parallel (process a query result while waiting for the next query to finish)

Hi I'm trying to run tasks in an asynchronous way, but can't get it to work. What I want to do is query a db (takes 30s) and process the result (takes 15s) while I make the next query. My problem ...
Marc Inizan's user avatar
0 votes
1 answer
6k views

Exception in thread Thread-2: Traceback (most recent call last) I can't make the multi threading work

I'm trying to build a discord bot who does 2 things in the same time. The first fonction check some profils on twitter and retweets when those profils tweet. The second take a screenshot on an ...
Likha's user avatar
  • 41
3 votes
1 answer
1k views

Which is the best way to parallelly running multiple tasks in Python

I have a function: import time def all_40k(): for _ in range(400000): print('validate') print('parsing') print('inserting') if __name__ == '__main__': start_time = ...
William's user avatar
  • 4,064
2 votes
1 answer
4k views

Run bleak (python library) in background with asyncio

I want to use the bleak library in Python to receive data from a Bluetooth Low Energy device. This part is working. My problem is now, that I don't know how to run this code in the background or ...
Frowin's user avatar
  • 23
-2 votes
1 answer
96 views

Python Multiproceesing Threading Asyncio

im writing a program and i need to have more than two process processes running simultaneously and they share few data. While trying to do that i reserched on Threads, Multiprocessing, Asyncio. ...
aja's user avatar
  • 97