elliottcable wrote:
> http://github.com/elliottcable/rat/tree/fiddlesticks
> > I'm attempting to write an IM client using Ncurses and xmpp4r - I  
> > understood xmpp4r was threaded and event-based, using threaded  
> > callbacks for events such as message reception... but somehow,  
> > Ncurses's input loop is blocking xmpp4r (or so it is as far as I can  
> > tell).
> >
> > When I have Ncurses waiting for input (via `Ncurses::getch()`), my  
> > `#add_message_callback` block (which currently, for testing  
> > purposes, contains a simple `system 'say "message received"'` system  
> > call) isn't being executed when I send a message from my testing  
> > target to the xmpp4r client.
> >
> > However, when `Ncurses::getch()` cycles, I get the first of any  
> > messages I've sent - and I get one more message every time it  
> > cycles. I have no idea what's causing this, or blocking the thread,  
> > or whatever - I'd really appreciate any help! I've been banging my  
> > head against this for days now, and I'm running out of patience )-:

I'm sorry, but I was not able to get it running. This looks like an
interesting project, please keep us informed about its progress.

If getch() disturbs Ruby's threading, how about adding "select [STDIN]"
to let Ruby control the polling?

HTH,
Stephan

_______________________________________________
Xmpp4r-devel mailing list
Xmpp4r-devel@gna.org
https://mail.gna.org/listinfo/xmpp4r-devel

Reply via email to