I needed to add I managed to connect by initializing the tickets with another value than 0. I set it to 1 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.i...@googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero)
On Sat, Nov 21, 2009 at 4:37 PM, Ivan Porto Carrero <i...@flanders.co.nz>wrote: > I know it has something to do with Threading and the value of @tickets in > this class. > I've just managed to connect with xmpp4r to my jabber server :=D but then > the stream is closed so you can't actually send messages etc. > > They have this class: > > ## > # This class implements semaphore for threads synchronization. > class Semaphore > > ## > # Initialize new semaphore > # > # val:: [Integer] number of threads, that can enter to section > def initialize(val=0) > @tickets = val > @lock = Mutex.new > @cond = ConditionVariable.new > end > > ## > # Waits until are available some free tickets > def wait > @lock.synchronize { > @cond.wait(@lock) while !(@tickets > 0) > @tickets -= 1 > } > end > > ## > # Unlocks guarded section, increments number of free tickets > def run > @lock.synchronize { > @tickets += 1 > @cond.signal > } > end > end > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Google Wave: portocarrero.i...@googlewave.com > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > > On Sat, Nov 21, 2009 at 2:28 PM, Jimmy Schementi < > jimmy.scheme...@microsoft.com> wrote: > >> The RC1 bits will be in GIT shortly … looks like the pushes to GIT haven’t >> been happening/working. Also, the RC1 “announcement” and other things from >> my RubyConf talk will make their way online over the next couple of days, >> but in short this release is “RC1” because we want more people to start >> using it and find blocking bugs. WRT xmpp4r, it’d be great if you could >> investigate what the actual bug is; a small repro will drastically increase >> the chances of it being fixes in the near future, especially when it’s a >> library failing for some strange reasons. >> >> >> >> ~js >> >> >> >> *From:* ironruby-core-boun...@rubyforge.org [mailto: >> ironruby-core-boun...@rubyforge.org] *On Behalf Of *Ivan Porto Carrero >> *Sent:* Saturday, November 21, 2009 12:06 AM >> *To:* ironruby-core >> *Subject:* [Ironruby-core] ironruby RC1 >> >> >> >> Hi >> >> >> >> I don't get any changes coming in for the repo for the last 3 days, are >> those changes that make up RC1 in? >> >> >> >> Then on a side note I'm still unable to run xmpp4r with IronRuby. it >> should work but gets stuck in waiting for a thread that never returns. >> >> >> >> >> >> >> --- >> Met vriendelijke groeten - Best regards - Salutations >> Ivan Porto Carrero >> Blog: http://flanders.co.nz >> Google Wave: portocarrero.i...@googlewave.com >> Twitter: http://twitter.com/casualjim >> Author of IronRuby in Action (http://manning.com/carrero) >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core@rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> >
_______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core