disc icon indicating copy to clipboard operation
disc copied to clipboard

Use connection_pool as a dumb thread pool instead of Celluloid

Open foca opened this issue 10 years ago • 1 comments

Instead of depending on Celluloid, which is complex and way too much for what we actually nead, this sets up a ConnectionPool that checks out nothing (i.e. the connections are just true), so that we can abuse it as a thread pool.

This would always make the workers threaded (set DISC_CONCURRENCY=1 if you want a single thread...).

Having a single code path is good, though. It means it's simpler to test features / bugfixes as we don't need to run every test by duplicate on threaded/nonthreaded mode.

Oh, and speaking about tests, did I mention this is just a WIP? :P

cc @pote

foca avatar Aug 07 '15 22:08 foca

I think dropping Celluloid and having a single code path are good things, however I'd like to move to something that won't break the non-threaded mode at least, what are your thoughts on the stability and safety of using ConnectionPool? Should we keep this as a WIP for the time being until we cook up a more definitive solution?

pote avatar Aug 10 '15 18:08 pote