Tagged Questions
0
votes
0answers
48 views
Parallel processing in python using threading
I have a program that is supposed to be a web crawler that processes and traverses URLs from separate pages concurrently. When the array of URLs gets too full, the program splits the array into four ...
10
votes
2answers
119 views
cython shared memory in cython.parallel.prange - block
I have a function foo that takes a pointer to memory as argument and both writes and reads to that memory:
cdef void foo (double *data):
data[some_index_int] = some_value_double
...
0
votes
1answer
339 views
Python multiprocessing pool for parallel processing
I want to execute some processes in parallel and wait until they finish. So I wrote this code:
pool = mp.Pool(5)
for a in table:
pool.apply(func, args = (some_args))
pool.close()
pool.join()
...
2
votes
1answer
169 views
Python 3 “Lock” for both: threads and processes
I have been trying to code a cache in python 3 and I want to avoid concurrency issues for both, threads and process.
I have been using threading for thread-safe code, and multiprocessing for process ...
1
vote
2answers
1k views
Sensible small Python example using locks with threads
I am searching for a sensible (i.e. it should really be useful in terms of efficiency) example using python threads & locks. I know many standard small examples but they are all missing at least ...