On Wed, Mar 12, 2014 at 5:20 AM, Bigmac Turdsplash <lists / ruby-forum.com> wrote:
> list=["google", "yahoo","bing","facebook","msn","bigmac"]# user will
> submit more every minute.
>
> list.each{|domain|
>    If not pid.exist("ping #{Domain}")
>     Thread.start{ IO.popen("ping #{domain}")}
>    End
> }
>
>
> I hope that explians what im trying to do...
>
> prevent duplicate process from starting...
>
> list.uniq is not a option. I'm looking for proces control...

What exactly are you trying to achieve?  From the looks of this it
sounds as if you want to have a constant stream of domain names as
input and ping each of them in parallel while preventing duplicate
pings to the same domain at the same time.  But what will be the
output of this?

Kind regards

robert


-- 
[guy, jim].each {|him| remember.him do |as, often| as.you_can - without end}
http://blog.rubybestpractices.com/