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
3
votes
1 answer

apply_async callback function not being called

I am a newbie to python,i am have function that calculate feature for my data and then return a list that should be processed and written in file.,..i am using Pool to do the calculation and then and use the callback function to write into…
Eliethesaiyan
  • 2,327
  • 1
  • 22
  • 35
3
votes
3 answers

Thread Safe Object Pool with Guarantee of Returning Existing Object if Strong References Exist?

I'm trying to extend the Clojure language to extend ACI-guaranteed refs to ACID-guaranteed drefs (durable refs). The API is to simply to call (dref key value), where key is a String of the key to be used in the underlying data store (BDB JE in my…
jennykwan
  • 2,631
  • 1
  • 22
  • 33
3
votes
3 answers

How to use boost::object_pool as a boost::multi_index allocator?

I am trying to implement a boost::multi_index application and performance is very bad: inserting 10,000 objects takes almost 0.1 second and it is not acceptable. So when I look into the documentation and found that boost::multi_index could accept a…
loudking
  • 115
  • 4
3
votes
1 answer

How to terminate an AsyncResult from multiprocessing pool?

I have a simple code like the one shown below. The first process holds back the queue, so none of them are completed. I would like to be able to kill an AsyncResult if it exceeds the .get() timeout, so my pool queue can move on. However I couldn't…
user1477337
  • 385
  • 2
  • 9
3
votes
2 answers

How to append return value of function into list in Pool?

I'm curious if it is possible to append a return value from function f(x,y) into, for example, list. So I have this: Parallel: def download_unit_LVs(self, cislo_uzemia): pool = Pool(number_of_workers) for cislo in cisla: …
Milano
  • 18,048
  • 37
  • 153
  • 353
3
votes
1 answer

Get remote application pool state using Microsoft.Web.Administration

I'm trying to get the state of an IIS 7.5 application pool using Microsoft.Web.Administration API, but get an exception: System.Runtime.InteropServices.COMException was unhandled ErrorCode=-2147020584 HResult=-2147020584 Message=The object…
Tanya
  • 31
  • 1
  • 3
3
votes
0 answers

Is @autoreleasepool pool required in secondary thread?

I read the Apple doc about the function of @autoreleasepool. It says in a new thread, the programmer should declare a new autorelease pool using the following code in ARC. @autoreleasepool{ //etc } But as my test, I did not add the…
Jay
  • 113
  • 1
  • 11
3
votes
1 answer

How does this Integer pool code work

I've been trying to understand how this integer pool works. It is a lot of bit fiddling stuff I can't wrap my head around. I'm assuming there is a concept I'm missing with the m2id array and how it is or'ed with index 'n' that I don't know and…
cleahcim
  • 61
  • 3
3
votes
1 answer

In Python's multiprocessing package, why is there multiprocessing.Pool and multiprocessing.pool.Pool?

While learning about Python's multiprocessing package (for Python 3.4), I noticed multiprocessing.Pool is defined in the Class BaseContext in context.py. This definition is def Pool(self, processes=None, initializer=None, initargs=(), …
user3731622
  • 4,844
  • 8
  • 45
  • 84
3
votes
1 answer

Jediscluster with Object pool

I am new to Jedis, found here I want to make pool of JedisCluster objects, using the constructor found as: public JedisCluster(Set nodes, final GenericObjectPoolConfig poolConfig) { this(nodes, DEFAULT_TIMEOUT,…
Ankur Verma
  • 5,793
  • 12
  • 57
  • 93
3
votes
1 answer

adbapi connection pool limitations

I am using twisted with MySQL using the adbapi connection pool. I only insert into my database (although at very fast rate). What happens if the connection pool runs out of connections because all connections are busy? Will the twisted event loop…
artn3r
  • 31
  • 1
3
votes
0 answers

Is possible to see the content of the Java String pool?

I was studying and reading about Java String pool and I did some examples to understand this feature, but I have a doubt: Is possible, is there a way to access or see the content of the string pool?
Robert
  • 10,403
  • 14
  • 67
  • 117
3
votes
1 answer

python, multiprocessing and dmtcp: checkpointing one process in Pool?

Is it possible to use python's integration of dmtcp to checkpoint a child process in parallel execution? My situation is as follows: I have a multiprocessing.Pool with several workers receiving async jobs (using apply_async). Certain big jobs…
3
votes
2 answers

malloc or memory pool without alignment

I am doing C code, and I have several (millions) of malloc's each requesting for 20-30 bytes of memory. As result the overhead of both GNU C Malloc and Jemalloc go to 40-50%. DL Malloc works better, but still ~30% overhead. Is there a way to do…
Nick
  • 9,962
  • 4
  • 42
  • 80
3
votes
0 answers

High memory usage with Python's multiprocessing.Pool

I wrote a program which parses ~2600 text documents into Python objects. Those objects have a lot of references to other objects and as a whole they describe the structure of a document. Serializing those objects with pickle is no problem and super…
tymm
  • 543
  • 1
  • 6
  • 18