Giter Site home page Giter Site logo

furious-objectpool's People

Watchers

 avatar

furious-objectpool's Issues

PoolSize = 0 does not work

Hi,
I'm using furiosObject Pool 1.1. and set the poolsize with this settings :

poolSettings = new PoolSettings<ConnectionPoolSocket>(
...
  });
//  Add some settings
poolSettings.min(0).max(6);     
poolSettings.validateWhenReturn(false);

because I have a Socket Connection inside my pool that rarely used and I want 
to close if is not used.

When test my code with :

ExecutorService threadExecutor = Executors.newFixedThreadPool(4);
for (int i = 0; i < 30; i++) {
        threadExecutor.submit(this);
}       
threadExecutor.shutdown();
try {
  Thread.sleep(60000);
} catch (InterruptedException e) {
}

I see myPool grow correctly to 4 connections but in the sleep time only 3 
connections are closed and 1 is alive.
Any hint to do that ?

Thank you very much and congratulations for the excellent work




Original issue reported on code.google.com by [email protected] on 28 Dec 2012 at 10:32

BlockingQueueObjectPool.getObj() must be synchronized

With concurrent accesses you have to synchronize the getObj() method.
If not totalSize will always be the min size defined for the pool and not grows 
correctly.

public synchronized T getObj() throws PoolException { ... }

Check on concurrent accessed methods please. ;)

Best regards,
Daniele Bonetto

Original issue reported on code.google.com by [email protected] on 18 Apr 2013 at 8:09

PoolControler thread should be daemon

PoolControler does not set itself to be a daemon thread, which hinders the JVM 
to exit when the main thread exits unless you explicitly have called 
Poolcontroler.shutdown(). Since I cannot see any reason for this behavior 
(there does not seem to be any external resources which need cleanup) I would 
like to ask you to call setDaemon(true) in the PoolControler constructor (right 
after setName(...)).

Original issue reported on code.google.com by [email protected] on 31 Mar 2014 at 12:30

PoolFactory.getPool() method implements the "Double Checked Locking" idiom which is broken.

What steps will reproduce the problem?
1. Depending on platform, JVM, and concurrent load, concurrent calls to the 
getPool() method of the PoolFactory class may result in a crash.
2.
3.

What is the expected output? What do you see instead?
It is expected that many threads may concurrently call getPool() on the same 
PoolFactory, and the same correctly initialized pool must be returned. It is 
possible however for the program to crash.

What version of the product are you using? On what operating system?
version 1.1.2 on Windows 7

Please provide any additional information below.
Check the internet for "Double Checked Locking in Java" to see exactly why the 
PoolFactory class is broken in a subtle way, and also how to easily fix it for 
J2SE 1.5 and later.

Original issue reported on code.google.com by [email protected] on 4 Jan 2015 at 11:01

Javadoc

Hello,

can you generate javadoc please ?

Cheers.

Original issue reported on code.google.com by [email protected] on 22 May 2012 at 10:25

problem getting simultaneous objects from pool

Hi,

there's a problem getting n simultaneous object from pool with a maximum of 
actives lesser than n using the 1.1.3 snapshot release.

I think the problem is caused by a null return of poolableObject.make() call in 
create function.

I tested it with this modifications and it works:

    protected void create() throws PoolException {
        T t = poolableObject.make();
        if (t != null) {
            totalSize.incrementAndGet();
            queue.add(t);
        }
    }

Can u verify and fix it please?

Regards,
Daniele

Original issue reported on code.google.com by [email protected] on 17 Feb 2014 at 2:19

No ability to set infinite blocking for pool requests

What steps will reproduce the problem?
1. Create a pool with 1 object & set maxWait time to 0 (infinite)
2. Take the object from pool
3. Try to take another object

What is the expected output? What do you see instead?
The second query returns immediately without blocking. Expected to block for 
infinite amount of time.

What version of the product are you using? On what operating system?
1.1.3-SNAPSHOT

Attached a patch to implement this feature.

Original issue reported on code.google.com by be.lietaus on 9 Sep 2013 at 7:41

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.