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

getting Cannot create JDBC driver of class '' for connect URL 'jdbc:mysql://127.0.0.1:3306/config in Netbeans'

I've searched through similar questions and didn't find a solution that worked for me. I'm running following in Netbeans > servlet: public Connection getConnection() { Connection result = null; BasicDataSource dataSource = getDataSource(); …
Max Karpov
  • 41
  • 1
  • 1
  • 3
-1
votes
2 answers

Yiimp pool reject all blocks

i have setup my YIIMP pool but seems that all blocks are rejected, i think is blocknotify problem 14:54:03: BTCRUBLE 213314 - diff 1.592820338 job e to 1/1/1 clients, hash 165.101/114.019 in 0.1 ms 14:54:05: *** REJECTED :( BTC RUBLE block 213314 1…
Alex
  • 1
  • 1
  • 3
-1
votes
1 answer

Python pathos Process Pool non-daemonic?

How can I implement non-daemonic processes with pathos in python3 instead of with the multiprocessing module? To be more specific, I am referring to: Python Process Pool non-daemonic? The answer to this post implements non-daemonic processes via the…
-1
votes
1 answer

Python function parameters for Pool.map

from multiprocessing import Pool from urllib.request import urlretrieve tmp= Pool(4).map(urlretrieve, urls) How can i specifiy the filename for urlretrieve in that case?
Th3Fi3nD
  • 67
  • 6
-1
votes
1 answer

Using python multiprocessing.Pool without returing result object

I have a large number of CPU-bounded tasks that I want to run in parallel. Most of those tasks will return similar results and I only need to store unique results and count non-unique ones. Here's how it is currently designed: I use two managed…
Anton K
  • 91
  • 1
  • 8
-1
votes
1 answer

Pythons multiprocessing's Pool does nothing

I wrote the following helper function to run arbitrary functions in parallel. import multiprocessing def runParallel(fns=[], args=[]): print('Starting multiprocessing with %i cores' % (multiprocessing.cpu_count() - 1)) pool =…
NoMonkey
  • 3
  • 3
-1
votes
1 answer

How to close current connection at hikariCP pool?

I need your help. I use hikariCP for pool connection and i get someone throuble when i create a query to DB. Connection is established and at DB occur process but response timeline is long about two hours and i want close connection manually. I set…
Porty
  • 19
  • 6
-1
votes
1 answer

“Too many values to unpack”

I have a function to preprocess images in batches to forward to caffe as input, it is something like below and returns two variables. def processImageCrop(im_info, transformer, flowtransformer): ..... return processed_image,…
dusa
  • 840
  • 3
  • 14
  • 31
-1
votes
1 answer

process large text file using python multiprocessing

http://www.ngcrawford.com/2012/03/29/python-multiprocessing-large-files/ I want to create a dictionary of a large text file using multiprocessing and I found this.But I have some questions about the parameters that author uses in this code: p =…
cai
  • 99
  • 1
  • 5
-1
votes
1 answer

Graceful Termination of Worker Pool

I want to spawn X number of Pool workers and give each of them X% of the work to do. My issue is that the work takes about 20 minutes to exhaust, longer for each extra process running, due to the type of calculations being done my answer may be…
Derrick Cheek
  • 147
  • 1
  • 6
-1
votes
2 answers

Matching codons

So I'm now learning about nested pools and I don't really get it. my task is to return all matching pairs in following format: [('AAG', 'TTC'), ('GAT', 'CTA'), ('TTG', 'AAC'), ('CAT', 'GTA'), ('GGC', 'CCG'), ('ATT', 'TAA'), ('TCT', 'AGA')] so…
Robin Dun
  • 7
  • 2
-1
votes
1 answer

Block choice of same data pool when random.shuffle

I am working on a code that looks at choice game in a mutliple round game. There are four choice (A,B,C,D) options and four payoff pools (pool_1, pool_2, pool_3 and pool_4). Every round there is one choice to be selected. Each choice is asssigned to…
Lenikago
  • 1
  • 1
-1
votes
3 answers

Custom memory management for creating an object per line in a file

This is my situation: I am reading in a very large file, say over 1GB and for every line I interpret and extract parts of the line to create an object. Therefore, I am continuously allocating memory: //For each line in a 1GB…
user997112
  • 29,025
  • 43
  • 182
  • 361
-1
votes
1 answer

Auto-increment dictionary key in c#

I'm trying to create specific object pool in c# . I have two basic methods, getObject and putObject and one thread-safe collection - concurrentDictionary (because of requiment to have some keys to identify objects in pool). But when I remove and…
-2
votes
1 answer

How to launch 100 workers in multiprocessing?

I am trying to use python to call my function, my_function() 100 times. Since my_function takes a while to run, I want to parallelize this process. I tried reading the docs for https://docs.python.org/3/library/multiprocessing.html but could not…
1 2 3
99
100