[Win32utils-devel] win32-api callback causes ruby to application error (crash).
djberg96 at gmail.com
Sun Jan 20 14:09:15 EST 2008
nao16t at gmail.com wrote:
> Hello all, & Dan-san,
> It runs in Ruby's main thread.
> Perhaps we should execute callbacks in
> their own Ruby thread. Does anyone else have any thoughts on this? It
> seems like a reasonable idea on the surface, but I may be missing deeper
> Ruby interpreter itself is single-threaded.
> But win32 callback is inherently multi-threaded.
> So I have no idea how win32-api C extension code should handle the win32
> In case of WinSNMP, is it better to write another C extension code
> somehow the win32 callback thread puts trap data into a queue, then ruby
> thread polls the queue ?
After today's experiment with SetConsoleCtrlHandler() I'm not so sure
this is possible to solve with Ruby 1.8.x.
We may have hit a wall here. This is bad.
If anyone has any ideas, please help!
More information about the win32utils-devel