pool

Unclosed connection - Connection Pool debugging SQL Server

谁说胖子不能爱 提交于 2019-12-07 08:54:05
问题 We have a suspect application leaving a connection open. Just wondering on the debugging tools for this, as to whether anyone has any good tools for isolating this, commercial or otherwise. I've Googled but only seem to bring up articles that describe the problem - not the steps for a solution. This is the best article I've seen so far. - Others welcome. Anyone have any products that isolate the problematic code? Profilers which perform this sort of thing, or any other advice to add? 回答1: You

Use different sprites texture in one generic pool AndEngine

孤街醉人 提交于 2019-12-06 14:40:56
问题 I want to use at least 9 image & they will be use via pool. But i can use only one texture for a Pool Class & can't use rest other. My code: Like: public class BubblePool extends GenericPool<Bubble> { public static BubblePool instance; private PixelPerfectTiledTextureRegion aITiledTextureRegion; public BubblePool(PixelPerfectTiledTextureRegion aTextureRegion) { if (aTextureRegion == null) { throw new IllegalArgumentException( "The Texture Region must not be null"); } this.aITiledTextureRegion

ceph cache pool配置

半腔热情 提交于 2019-12-06 08:16:52
0.引入 本文介绍如何配置cache pool tiering. cache pool的作用是提供可扩展的cache,用来缓存ceph的热点数据或者直接用来作为高速pool。如何建立一个cache pool:首先利用ssd盘做一个虚拟的bucket tree, 然后创建一个cache pool,设置其crush映射rule和相关配置,最后关联需要用到的pool到cache pool。 1.建立ssd bucket tree 这 是新增ssd bucket(vrack)后的osd tree。其中osd.1 osd.0 osd.2使用的是ssd盘。如何创建将简单,无非是调整或新增osd到bucket tree下。 # ceph osd tree ID WEIGHT TYPE NAME UP/DOWN REWEIGHT PRIMARY-AFFINITY -1 6.00000 root default -2 6.00000 room test -3 3.00000 rack r1 -7 1.00000 host H09 3 1.00000 osd.3 up 1.00000 1.00000 -9 1.00000 host H07 5 1.00000 osd.5 up 1.00000 1.00000 -10 1.00000 host H06 6 1.00000 osd.6 up 1.00000

Manage Client Socket Pool

99封情书 提交于 2019-12-06 07:34:50
I need to manage long running TCP socket connections to an external server from my Java application. I'm looking for a good socket pool so I will be able to re-use the sockets. There is another solution than org.apache.commons.pool2 ? Here are some object pool implementations you may try: Vibur Object Pool fast-object-pool I suggest you to benchmark the object pool implementations in order to find the most appropriate one for your project. 来源: https://stackoverflow.com/questions/43735067/manage-client-socket-pool

Optimizing multiprocessing.Pool with expensive initialization

泄露秘密 提交于 2019-12-06 04:26:51
问题 Here is a complete simple working example import multiprocessing as mp import time import random class Foo: def __init__(self): # some expensive set up function in the real code self.x = 2 print('initializing') def run(self, y): time.sleep(random.random() / 10.) return self.x + y def f(y): foo = Foo() return foo.run(y) def main(): pool = mp.Pool(4) for result in pool.map(f, range(10)): print(result) pool.close() pool.join() if __name__ == '__main__': main() How can I modify it so Foo is only

Multiprocessing Pool inside Process time out

此生再无相见时 提交于 2019-12-06 03:00:22
When ever I use the following code the pool result always returns a timeout, is there something logically incorrect I am doing? from multiprocessing import Pool, Process, cpu_count def add(num): return num+1 def add_wrap(num): new_num = ppool.apply_async(add, [num]) print new_num.get(timeout=3) ppool = Pool(processes=cpu_count() ) test = Process(target=add_wrap, args=(5,)).start() I'm aware of this bug , and would have thought that it would have been fixed in python 2.6.4? You can't pass Pool objects between processes. If you try this code, Python will raise a exception : 'NotImplementedError:

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

北战南征 提交于 2019-12-06 01:37:06
问题 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 = ConfigParser.ConfigParser() cp.read(gdbini) for table in cp.sections(): jobs.append(table) #print jobs poolreturn = pool.map(worker, jobs) pool.close() pool.join() Failure Message: Traceback (most recent call last): File "/opt/cnet-python/default-2.6/lib

Thread Pool vs Many Individual Threads

人走茶凉 提交于 2019-12-05 23:15:01
问题 I'm in the middle of a problem where I am unable decide which solution to take. The problem is a bit unique. Lets put it this way, i am receiving data from the network continuously (2 to 4 times per second). Now each data belongs to a different, lets say, group. Now, lets call these groups, group1, group2 and so on. Each group has a dedicated job queue where data from the network is filtered and added to its corresponding group for processing. At first I created a dedicated thread per group

Is there a generic “Object Pool” implementation for Delphi?

余生颓废 提交于 2019-12-05 21:52:04
I came across this while looking for a database connection pool implementation for Delphi. An object pool needs two methods: get - to acquire an object from the pool (this will create a new instance if the pool is empty or its size has not reached its maximum size), this methods must be thread safe so that one object can not be acquired by two threads at the same time. If all objects are iin use, the get method must block (maybe with an optional time out) put - to release (return) an object to the pool So a use case would look like O := Pool.Get; try ... use O finally Pool.Put(O); end; Update:

python prime crunching: processing pool is slower?

久未见 提交于 2019-12-05 20:47:48
问题 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 familiarize myself with it and recently finished a program that brute forces games of hangman. Anywho, I was doing an execution time compairison of summing all the prime numbers between 1 million and 2 million both single threaded and through a processing