All Questions
5 questions
2
votes
1
answer
784
views
Why ThreadPoolExecutor ignoring exceptions?
I have a code like this:
from concurrent.futures.thread import ThreadPoolExecutor
from time import sleep
def foo(message, time):
sleep(time)
print('Before exception in ' + message)
raise ...
0
votes
0
answers
137
views
How to increase for loop performance in Python
I have a for loop where there are a series of operations performed but one method in particular I discovered takes about 44% of the time for the entire iteration to execute. In order to increase the ...
1
vote
1
answer
337
views
Why concurrency doesn't work when using ThreadPoolExecutor?
I'm writing an app for inserting data from excels(with several sheets, 7-10MB, about 150 thousand rows) into databases.I parse excels with
pandas.read_excel and i want to reduce the time waiting for ...
3
votes
0
answers
2k
views
Python: fastest (parallel) way to download thousands of zipped files using requests
Background
For our research we currently need to download ~ 15.000 files. While the database has it's command line tool, to support "bulk" download, this is totally unfeasible to do this for 15.000 ...
7
votes
1
answer
2k
views
How to test concurrency using py.test
I want to test a thread safety of a function using py.test
My efforts:
def function_to_be_tested(arg1,arg2):
some functionality
class Test:
def setup()
def teardown()
def test_conc()
...