Threadpool Implementations

What’s a good threadpool implementation that I can use?

I’ll be using it to send HTTP requests from a Rails script driven by
script/runner.

– vlad

Content preview: Hi, On 15.06.2011 23:25, vlad wrote: > What’s a good
threadpool
implementation that I can use? Don’t know if its good, this one
works well
for me: http://snippets.dzone.com/posts/show/3276 . I also use it
fire away
parallel HTTP besides other things (in my case I’ve three such
thread pools).
[…]

Content analysis details: (-2.9 points, 5.0 required)

pts rule name description



-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
X-Cloudmark-Analysis: v=1.1
cv=Nww7yNiXF4C1XGF+VcigPkOcTpD8wJaI1KQuZlH5eEk= c=1 sm=0
a=CPlwVjms4CEA:10 a=IkcTkHD0fZMA:10 a=wSa8saciAAAA:8
a=WuESut-9RrsbsOYXYV0A:9 a=QEXdDO2ut3YA:10
a=HpAAvcLHHh0Zw7uRqdWCyQ==:117
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: bulk
Lines: 16
List-Id: ruby-talk.ruby-lang.org
List-Software: fml [fml 4.0.3 release (20011202/4.0.3)]
List-Post: mailto:[email protected]
List-Owner: mailto:[email protected]
List-Help: mailto:[email protected]?body=help
List-Unsubscribe: mailto:[email protected]?body=unsubscribe
Received-SPF: none (Address does not pass the Sender Policy Framework)
SPF=FROM;
[email protected];
remoteip=::ffff:221.186.184.68;
remotehost=carbon.ruby-lang.org;
helo=carbon.ruby-lang.org;
receiver=eq4.andreas-s.net;

Hi,

On 15.06.2011 23:25, vlad wrote:

What’s a good threadpool implementation that I can use?

Don’t know if its good, this one works well for me:
http://snippets.dzone.com/posts/show/3276 . I also use it fire away
parallel HTTP besides other things (in my case I’ve three such thread
pools).

I only modified it slightly, removed the sleep 0.0something and replaced
it with Thread.pass ; I also extended the #process method to also take
args and not just a block.

HTH,

  • Markus

On Jun 15, 2011, at 4:25 PM, vlad wrote:

What’s a good threadpool implementation that I can use?

I’ll be using it to send HTTP requests from a Rails script driven by
script/runner.

I’ve had very good luck with threadz.

https://github.com/nanodeath/threadz

cr

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs