----- Original Message ----- 
From: <nagai / ai.kyutech.ac.jp>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Friday, June 21, 2002 2:34 AM
Subject: Re: Minor Tk bug on Windows?


> I think the bugs are based on the colision of Ruby's and Tk's 
> memory management. In the script which has trouble, for ForcusIn 
> event, Tcl/Tk interpreter calls Ruby interpreter to proceed the 
> bind proc. And Ruby interpreter calls Tcl/Tk interpreter to set 
> a value to a Tcl variable. After that, Tcl/Tk interpreter removes 
> the event data structure from the event queue and free the memory 
> for the event data structure. On this step, data on Ruby and data 
> on Tcl/Tk have relationship, but Ruby's and Tk's memory management 
> are independent each other. I think either or both of two interpreter 
> break the other's data structure. 
> 
> Thread switching makes the situation extremely complex. And such as 
> your problem, it seems depend on OS environment. Therefore, I can't 
> still find the buggy part.

Thank you for your hard work... I am impressed with the job you
have done, and I admit it is not something I could do.  :)

You mention that thread switching makes it more complex. Aren't there 
threading problems on Windows? I have heard of these lately, but have
not seen them. Is there a connection?

I did many experiments with threading last year, both UNIX and Windows.
But I was using the Cygwin version on Windows then, and now I am not.

Thanks,
Hal Fulton