[Win32utils-devel] win32/service... still with problems.
luislavena at gmail.com
Mon May 22 12:00:36 EDT 2006
In my quest to get Mongrel working as service for win32, found some
problems with win32/service that make it impossible to solve.
Attached is the simplest service script I could do with ruby, which
depends on win32/service.
I found that doing anything complex in service_stop (killing threads,
doing file handling, even sleeping for 0.25 seconds). crash the
service with backtraces (of the service) like this:
dead_service.rb:119:in `service_main': uninitialized constant RUNNING
Just commenting the sleep command solves that problem, but leaves
other issues there... like the impossible task of killing running
threads (from a ThreadGroup, as example).
Also, removing the while state == RUNNING loop solves the sleep and
file handling issues, but still exist problems with already running
threads that must be killed/stopped.
Or: I'm doing something wrong (in which case please enlighten me) or
there is something wrong on how the threading model is implemented?
(and the mix of C threads with ruby threads).
Thanks in advance for your time,
Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3360 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/win32utils-devel/attachments/20060522/1270f741/attachment.obj
More information about the win32utils-devel