List Info

Thread: Re: WxRuby Newbie Application Hanging




Re: WxRuby Newbie Application Hanging
country flaguser name
United States
2007-10-06 00:34:58
Lance Carlson wrote:
> What is wrong with multi-threading in wx::ruby. Isn't
the Thread class
> a ruby core class?
>   

Hey Lance,

There is a problem with Multi-Threading that you may not
realize, Ruby 
uses Green Threads, which means, that Ruby is the one in
control of all 
the threads.  It contains the code that actually creates a
"Virtual 
Thread", that only the Ruby Interpreter knows about. 
wxRuby, or rather 
wxWidgets in general, uses OS Thread creation.  wxRuby
currently does 
not implement the wxThread class, cause the Ruby interpreter
(Atleast as 
of 1.8 series) is not Thread compliant.  But there are ways
around that, 
and I've posted a tutorial, as previously mentioned twice
now, that 
shows a work around, that will allow you to work with wxRuby
and Ruby's 
green threads.

But yea, there are problems, and work arounds to make some
things work.

L8ers,
Mario Steele
_______________________________________________
wxruby-users mailing list
wxruby-usersrubyforge.org
ht
tp://rubyforge.org/mailman/listinfo/wxruby-users

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )