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

IIS still accessing resources via pool identity, not impersonated user

I'm at my whitt's end! On Server 2003, I have an INTRANET app configured to use BASIC AUTHENTICATION and an app pool with a dedicated account. In web.config I'm specifying In a…
Todd Beaulieu
  • 627
  • 6
  • 7
3
votes
1 answer

How to use Ampoule with Twisted to create a pool mixed of local and remote processes?

I've been told, that a Twisted-based library Ampoule is a great way to create a pool of processes that are executed on different computers. However there is no docs for that and Ampoule's examples also don't make it any clear. I'd be totally happy…
vak
  • 1,694
  • 14
  • 18
3
votes
1 answer

How to reuse slice with sync.Pool in golang?

Consider this code: type TestStruct struct { Name string } func TestSliceWithPool(t *testing.T) { var slicePool = sync.Pool{ New: func() interface{} { t.Log("i am created") s := make([]interface{}, 0) …
CharmCcc
  • 113
  • 11
3
votes
1 answer

Can you do nested parallelization using multiprocessing in Python?

I am new to multiprocessing in Python and I am trying to do the following: import os from multiprocessing import Pool from random import randint def example_function(a): new_numbers = [randint(1, a) for i in range(0, 50)] with…
3
votes
2 answers

Can you pre-install libraries on Databricks Pool nodes?

We have a number of Python Databricks jobs that all use the same underlying Wheel package to install their dependencies. Installing this Wheel package even with a node that has been idling in a Pool still takes 90 seconds. Some of these jobs are…
WarSame
  • 870
  • 1
  • 10
  • 24
3
votes
1 answer

Ktor Default pool

With reference to to Ktor Pool implementation, may someone explain concept behind this implementation of pop and push. I tried to step through the code but I am still not wiser after studying the code. Below is the code snippet that I am struggling…
sheu
  • 284
  • 5
  • 13
3
votes
1 answer

NodeJS Mysql pool.query() not releasing connections?

I am having trouble with pooling mysql connections with nodeJS. As I understand it, when creating a pool, I should be able to use pool.query() to: Get a connection Run my query Release the connection However, the issue I am running into is the…
PiddlyBapz
  • 33
  • 1
  • 4
3
votes
2 answers

Global Variable in Multiprocessing Pool

I know this issue has been discussed here before, but I just cannot find any method that works. I want to share a global variable between my multiprocessing processes without any of the processes changing it, i.e. they just need read access. As a…
3
votes
0 answers

Memory usage keep increasing with Python's multiprocessing.pool after compiling with pyinstaller

Here is my program with multiprocessing for processing some images: import multiprocessing as mp import tqdm def image_process(path): # ... return def main(): images = [# some images' dir path] result = [] pool =…
Hui Gordon
  • 345
  • 1
  • 3
  • 13
3
votes
1 answer

In Python multiprocessing. Pool, how to get the print result in the subprocess

The thing is that: def main_fun(x): ... print(x) if __name__ == "__main__": with Pool(5) as pool: pool.map(main_fun,range(10000)) pool.close() pool.join() My question is that: if I run the code on my own computer, it…
master_zhen
  • 37
  • 1
  • 4
3
votes
1 answer

Python multiprocessing pool OSError: Too many files open

I have to check how much time do_something() takes in total for a pair of lists containing 30k elements. Below is my code def run(a, b, data): p = datetime.datetime.now() val = do_something(a, b, data[0], data[1]) q =…
Somnath Rakshit
  • 555
  • 1
  • 6
  • 17
3
votes
1 answer

How to exit a while loop in a multiprocessing pool process from the main script in python

EDIT 3: See last example at the end. I need a while loop doing continuous send and return operations with an USB connection. During this continuous operation I need (amongst other stuff in my main script) a few identical and isolated send/return…
3
votes
1 answer

multiprocessing.pool.MaybeEncodingError: Error sending result occurs at last object

I keep having an issue when executing a function multiple times at once using the multiprocessing.Pool class. I am using Python 3.8.3 on Windows 10 with PyCharm 2017.3. The function I am executing is opening and serialising excel files from my…
3
votes
1 answer

JedisPool number of connections issue

am new to redis and use a JedisPool in my multi-threaded app. JedisPoolConfig config = new JedisPoolConfig(); config.setMaxActive(200); config.setMaxIdle(200); pool = new JedisPool(config,"localhost",6379,-1,jedisPasswd); I want to have 200…
itsraja
  • 1,640
  • 4
  • 32
  • 48
3
votes
0 answers

Pool - Multiprocessing - [Errno 13] Permission denied

I'm trying to run a Jupyter Notebook that uses "Pool" From the Multiprocessing package and getting the "[Errno 13] Permission denied" error --------------------------------------------------------------------------- PermissionError …
user308522
  • 31
  • 2