[Win32utils-devel] [Fwd: Ruby Win32-Service]

Heesob Park phasis at gmail.com
Sun Jun 18 21:36:56 EDT 2006


2006/6/19, Patrick Hurley <phurley at gmail.com>:
> On 6/18/06, Heesob Park <phasis at gmail.com> wrote:
> > As you know, using native thread is not recommended in the current ruby version.
>
> True, but it is safe to use native threads as long as they don't call
> any ruby functions. So my thought was use a native thread to deal with
> the blocked StartServiceCtrlDispatcher, but do some sort of ugly spin
> in a green ruby thread (unless I can find a better way to interface to
> the native thread).
>
That is just the current win32-service implementation.
When the green ruby thread sleeps, all native threads blocked. and
StartServiceCtrlDispatcher can't accept the service control event.

> I have dealt with other non-thread safe libraries using similar
> techniques in services with a fair degree of success in the past (but
> admittedly never with Ruby).
>
> I will give it a try tomorrow and let you know how it goes, if it goes
> well, I will provide a patch.
>
I hope you will make a good patch.

Thanks
Park Heesob


More information about the win32utils-devel mailing list