Start a Conversation

Unsolved

This post is more than 5 years old

3823

September 14th, 2009 12:00

FPPool multithread

Hi,

just want to confirm is FPPool thread safe? or what's the best practice in using it in the multithread environment?  that is, after I got a FPPool from:

FPPool myPool = new FPPool( clusterAddresses );

then if I need to start reading/streaming clips blob data in multiple threads, can I use the same FPPool ( myPool ) in multiple threads to do the clip open etc., or should I create a new FPPool in each thread?

Thanks for any comments!

409 Posts

September 14th, 2009 14:00

Yes the pool connection is thread safe and in fact it is one of our best practises that you open a pool connection once and use that pool reference for all your IO threads.

Creating a new pool connection is very expensive so you should not create a new one for each thread

10 Posts

September 14th, 2009 14:00

Thanks a lot for the prompt reply Paul.

No Events found!

Top