That is the question. I called a function using a thread, but when I return to main control, main becomes in sleep status within a few moments.
Example (Look
here is a line that calls a Win32API function GetMessage
):
Start()
e = Thread.new { Look() }
for _i in 0..1000
puts e.status
end
This code should print the e
's status 1000 times, but it just prints once. I cannot find a reasonable error. Look
does not return until it gets a message, so I suspect that this could be causing an error.