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
0
votes
3 answers

How to work with many connection in c# and ASP.NET?

This is how I do my connection SqlConnection conn = new SqlConnection(connectionstring); conn.open(); SqlCommand comando = new SqlCommand(/*my query update/delete/insert/select o execute…
angel
  • 4,474
  • 12
  • 57
  • 89
0
votes
2 answers

Python 2.7: process pool not working (inifinite workers created)

My multiprocess pool is not working and is behaving strangely: from multiprocessing import Pool import multiprocessing, logging logger = multiprocessing.log_to_stderr() logger.setLevel(multiprocessing.SUBDEBUG) def f(x): return x*x if…
Muhd
  • 24,305
  • 22
  • 61
  • 78
0
votes
1 answer

Random Sprite with Sprite Pool

I wanna know how Sprite Pool works, since I dont really understand them. What I'm trying to do is show random sprites each time user touch the button (I already manage the control), but my code doesn't seem right, because it only shows the same…
0
votes
4 answers

Simple String Pool

If I have a completely empty String Pool in Java and I do the following, does the string object 'Hello' be added to the string pool.? String myStr = new String('Hello'); I know that subsequent calls to new String('Hello'); will create a new string…
TheCoder
  • 8,413
  • 15
  • 42
  • 54
0
votes
1 answer

Does anyone know why my object pool won't work after i dispose of an object?

After trying to optimize my game i started off with the obvious object pool. I followed the more complicated one using max_growth etc then went on to a simple one but i keep hitting the same problems. Now after over 40hrs of searching online and…
0
votes
1 answer

Monitor status of Object pool workers

I have created this thread from inside another class for reading status of executors on finish and cancel rest of tasks on failure. Tasks are Runnable If there is any failure seen, overall status has to be 1 or fail final CompletionService…
fortm
  • 4,066
  • 5
  • 49
  • 79
0
votes
4 answers

storing and retrieving a pointer in an array in c++

I have a large char array which is functioning as a memory pool and want to store a pointer in the first position of the array which points to whatever the next open position in the pool is, so every time something is allocated to the pool the…
zfetters
  • 447
  • 2
  • 11
0
votes
0 answers

CompletionService and ObjectPool

//Worker Thread class MyRunnable implements Runnable { private String status; public void getStatus() { return status; } public void run() { try { if(Thread.interrupted()) throw new InterruptedException(); …
fortm
  • 4,066
  • 5
  • 49
  • 79
0
votes
1 answer

C++ memory pool with char array

I just have a quick question regarding how a char array works in regards to a memory pool and allocating pointers of other variable types to it. I am working on an assignment which uses a char array for a memory pool and I need to be able to…
zfetters
  • 447
  • 2
  • 11
0
votes
1 answer

Pooling: Cleanup Pool

I have a pool of fileserver connections. (to cache connected fileservers) Now, if there are 100 open connections in the pool, I want to cleanup after a while. I would do a cleanup after 15 min. (e.g. close 20% of the active connections after 15 min…
user437899
  • 8,879
  • 13
  • 51
  • 71
0
votes
3 answers

Python process pool and scope

I am trying to run autogenerated code (which might potentially not terminate) in a loop, for genetic programming. I'm trying to use multiprocessing pool for this, since I don't want the big performance overhead of creating a new process each time,…
Ash
  • 745
  • 2
  • 13
  • 21
0
votes
1 answer

How do I bind a pool (without too much boilerplate) in Guice?

I have a common interface like so: trait Thing { ... } And implementations like so: class ThingA extends Thing { ... } class ThingB extends Thing { ... } Which one to use is determined at runtime, so a pool is configured to provide the…
Scoobie
  • 1,097
  • 2
  • 12
  • 22
0
votes
1 answer

get a single Thread from ThreadPoolExecutor

I am running a ThreadPoolExecutor with a number of Threads. I want to manipulate some data in the Threads, so I want to send an object to the thread and after it finishes use the data. The only way I know how is to wait until the thread finished…
ron reish
  • 81
  • 1
  • 1
  • 5
0
votes
1 answer

does Akka manage Camel consumer thread or Camel context manage consumer thread?

the camel document mentioned that CamelContext manages threads for its consumers. Akka integrated Camel thru Camel extension. we know that Akka has its own thread pools (dispatcher). so the question is: who manages Akka Camel consumer/actor threads?…
wang.aurora
  • 255
  • 3
  • 8
0
votes
1 answer

How to detect closed connections in connection pool?

Imagine having an active BoneCP jdbc connection pool when the network connectivity goes down, then comes back after a minute. In order to automatically reconnect and recreate the pool, how should BoneCP be configured? Currently if I try this, all…
Faustas
  • 350
  • 1
  • 2
  • 10