[#41916] Proposal: Bitmap Marking GC — Narihiro Nakamura <authornari@...>

Hi.

18 messages 2012/01/05

[#41941] [ruby-trunk - Bug #5851][Open] make check fails when compiling with GCC 4.7 - *** longjmp causes uninitialized stack frame *** — Vit Ondruch <v.ondruch@...>

12 messages 2012/01/06

[#41979] [ruby-trunk - Bug #5865][Open] Exception#== should return false if the classes differ — Hiro Asari <asari.ruby@...>

10 messages 2012/01/08

[#42003] [ruby-trunk - Bug #5871][Open] regexp \W matches some word characters when inside a case-insensitive character class — Gareth Adams <gareth@...>

14 messages 2012/01/09

[#42016] [ruby-trunk - Feature #5873][Open] Adopt FFI over DL — Heesob Park <phasis@...>

15 messages 2012/01/10

[#42149] [ruby-trunk - Feature #5899][Open] chaining comparsions. — Ondrej Bilka <neleai@...>

12 messages 2012/01/16

[#42164] [ruby-trunk - Feature #5903][Open] Optimize st_table (take 2) — Yura Sokolov <funny.falcon@...>

18 messages 2012/01/17

[ruby-core:42286] Re: Why Ruby 1.9 GUI hangs if i do any intensive computation in separate Ruby thread?

From: "Haase, Konstantin" <Konstantin.Haase@...>
Date: 2012-01-31 15:12:31 UTC
List: ruby-core #42286
the GIL is *not* supposed to lift if some threads enters native code...

On Jan 31, 2012, at 08:05 , Grigory Petrov wrote:

> Hello
>=20
> Ruby 1.9 suppose to have native threads, and GIL is supposed to lift
> if some threads enters native code (like GUI toolkit main loop or C
> implementation of some Ruby lib). But if i start following simple code
> sample that displays GUI in main thread and do some basic math in
> separate thread - the GUI will hang out badly and dragging window will
> redraw ~ every 10 seconds or so :(. I have checked with different GUI
> toolkit, Qt (qtbindings gem) - it behaves exactly same. Tested with
> Ruby 1.9.3-p0 on Windows 7 and OSX 10.7
>=20
> require 'tk'
> require 'thread'
> require 'rexml/document'
> Thread.new { loop { a =3D 1 } }
> TkRoot.new.mainloop()
>=20
> Same code in Python works fine without any GUI hangs:
>=20
> from Tkinter import *
> from threading import *
> class WorkThread( Thread ) :
> def run( self ) :
>   while True :
>     a =3D 1
> WorkThread().start()
> Tk().mainloop()
>=20
> What i'm doing wrong?
>=20


In This Thread