[Kde-bindings] QThread through smoke?

Richard Dale Richard_Dale at tipitina.demon.co.uk
Sat Feb 12 08:08:12 UTC 2005


On Saturday 12 February 2005 03:38, Ashley Winters wrote:
> --- Caleb Tennis <caleb at gentoo.org> wrote:
> > On Friday 11 February 2005 10:35 am, Caleb Tennis wrote:
> > > I've been wondering about using the QThread class instead of
> >
> > builtin thread
> >
> > > support - particularly in Ruby.  From what I can see, the smoke
> >
> > bindings
> >
> > > allow for the "qthread.h" header to be parsed, but it seems like
> >
> > kalyptus
> >
> > > doesn't build a binding for it (at least, it doesn't on my system).
> >
> >  Is
> >
> > > there a reason for this?
>
> Well, there's a reason for it in Perl, but I don't know if it's the
> same in Ruby. The Perl interpreter and variables aren't thread-safe, so
> each thread gets its own interpreter and variables (unlike C++, Perl
> variables aren't shared across threads except through special
> shared&locked variables)
Ruby threads aren't native threads, and are different to Qt threads. I'm not 
sure that it's a good idea to use Qt::Threads with ruby - why not use ruby 
threads? All Qt calls need to be made by the main thread, but as long as the 
other threads don't make Qt calls it works fine.

-- Richard



More information about the Kde-bindings mailing list