Object Pool Implementation & drb

E

Edgardo Hames

Hi. Last night I implemented a thread-safe ObjectPool class, without
even looking at RAA (shame on me!). When getting a new object from the
pool it can take a block and so release it when done (hey, I'm making
some progress here :)
Today, I found ResourcePool on RAA and have a couple of questions.

1) Shouldn't each ResourcePool be a singleton class? Does that mess up
when multiple threads try to access the pool? It shouldn't since it is
thread-safe.

2) Looking at drb.rb I saw a FIXME comment when it manages the
connection pool. Could an already implemented pool be used instead of
re-writing it?

Regards,
Ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top