------art_5012_1215614.1151641124012
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Put some printfs in the C code - I think you'll find it never gets out of
GetMessage.  If your thread has no windows it may have no events... or it it
returns a negative value you'll stay in the loop as long as it gets errors.

good luck!
JB

On 6/29/06, Victor 'Zverok' Shepelev <vshepelev / imho.com.ua> wrote:
>
> Hi all.
> I've tried the simple code:
>
> Thread.new{ runMessageCycle}
> puts 'here'
>
> where runMessageCycle is a simple C extension method with Win32 message
> cycle:
>
> static VALUE run(VALUE _self)
> {
>         MSG msg;
>         while (::GetMessage(&msg, NULL, 0, 0))
>         {
>                 ::TranslateMessage(&msg);
>                 ::DispatchMessage(&msg);
>         }
>
>         return _self;
> }
>
> I'm very surprised that Thread.new don't returns ("here" will be never
> printed).
> What is silly with my code?
>
> Thanks,
> Victor.
>
>
>

------art_5012_1215614.1151641124012--