Questions tagged [pool]

A pool describes a cache of resources that an application can draw from to save instantiation time.

Pools typically refer to database connections but the term can be applied to graphics handles, files and other run-time processes. When the use of such a resource is complete but the application is still running, it will typically return the resource to the pool rather than release it.

1504 questions
8
votes
3 answers

Python multiprocessing: Pool of custom Processes

I am subclassing the Process class, into a class I call EdgeRenderer. I want to use multiprocessing.Pool, except instead of regular Processes, I want them to be instances of my EdgeRenderer. Possible? How?
Ram Rachum
  • 84,019
  • 84
  • 236
  • 374
8
votes
1 answer

python prime crunching: processing pool is slower?

So I've been messing around with python's multiprocessing lib for the last few days and I really like the processing pool. It's easy to implement and I can visualize a lot of uses. I've done a couple of projects I've heard about before to…
Laharah
  • 363
  • 4
  • 11
8
votes
1 answer

Python ValueError: Pool not running in Async Multiprocessing

I have a simple code: path = [filepath1, filepath2, filepath3] def umap_embedding(filepath): file = np.genfromtxt(filepath,delimiter=' ') if len(file) > 20000: file = file[np.random.choice(file.shape[0], 20000, replace=False), :] …
Thanh Nguyen
  • 902
  • 2
  • 12
  • 31
8
votes
1 answer

python multiprocessing Pool not always using all workers

The problem: When sending 1000 tasks to apply_async, they run in parallel on all 48 CPUs, but then sometimes fewer and fewer CPUs run, until only one CPU left is running, and only when the last one finishes its task, then all the CPUs continue…
Rabak
  • 83
  • 1
  • 4
8
votes
1 answer

Handling worker death in multiprocessing Pool

I have a simple server: from multiprocessing import Pool, TimeoutError import time import os if __name__ == '__main__': # start worker processes pool = Pool(processes=1) while True: # evaluate "os.getpid()" asynchronously …
ivo
  • 1,103
  • 10
  • 13
8
votes
2 answers

Joblib memory usage keeps growing

I have the following problem. My purpose is to process a bunch of documents (bring all words to normal form, e.g. 'was' --> 'be', 'were' --> 'be', 'went' --> 'go'). Which means, I need to open each file in a directory, change its content and save…
fremorie
  • 713
  • 2
  • 9
  • 20
8
votes
1 answer

How to configure CommonsPool2TargetSource in spring?

This become pain in my neck!!! I have three queries. 1)I want to configure CommonsPool2TargetSource in my project for pooling of my custom POJO class. What I have done so far : MySpringBeanConfig class : @Configuration @EnableWebMvc …
8
votes
2 answers

Multiprocessing Pool in Python - Only single CPU is utilized

Original Question I am trying to use multiprocessing Pool in Python. This is my code: def f(x): return x def foo(): p = multiprocessing.Pool() mapper = p.imap_unordered for x in xrange(1, 11): res =…
Maggie
  • 5,923
  • 8
  • 41
  • 56
8
votes
2 answers

multiprocessing Pool hangs when there is a exception in any of the thread

I am new to Python and trying a multiprocessing.pool program to process files, it works fine as long as there are no exceptions. If any of the thread/process gets an exception the whole program waits for the thread snippet of the code: cp =…
mk.
  • 81
  • 1
  • 2
8
votes
6 answers

String Pool behavior

I read this Questions about Java's String pool and understand the basic concept of string pool but still don't understand the behavior. First: it works if you directly assign the value and both s1 and s2 refer to the same object in the pool String…
Jaxox
  • 960
  • 4
  • 14
  • 25
8
votes
3 answers

Kind of load balanced thread pool in java

I am looking for a load balanced thread pool with no success so far. (Not sure whether load balancing is the correct wording). Let me explain what I try to achieve. Part 1: I have Jobs, with 8 to 10 single tasks. On a 6 core CPU I let 8 thread work…
Christian Rockrohr
  • 1,045
  • 1
  • 14
  • 29
8
votes
1 answer

WiX: Installer always changes AppPool to enable 32bit app

WiX installer installs silverlight web application. It can work under 32 or 64 bit app pool. But when installation completed I see that selected app pool always set to Enable 32-bit applications.It is even for 64-bit pools. It is not sutiable…
ZedZip
  • 5,794
  • 15
  • 66
  • 119
7
votes
1 answer

application pool stopped on webrequest

I have a site that has been working fine for months. This morning I started getting 503 Service Unavailable errors. After checking IIS, I noticed that the application pool is being stopped. Since I had issues with it before, I suspected WebRequest…
cvanniekerk
  • 137
  • 1
  • 1
  • 7
7
votes
1 answer

Python, multithreading too slow, multiprocess

I'm a multiprocessing newbie, I know something about threading but I need to increase the speed of this calculation, hopefully with multiprocessing: Example Description: sends string to a thread, alters string + benchmark test, send result back…
Rhys
  • 4,926
  • 14
  • 41
  • 64
7
votes
1 answer

Python multiprocessing - Passing a list of dicts to a pool

This question may be a duplicate. However, I read lot of stuff around on this topic, and I didn't find one that matches my case - or at least, I didn't understood it. Sorry for the inconvenance. What I'm trying to do is fairly common, passing a list…
Le Minaw
  • 835
  • 7
  • 17