[ANN] win32-service 0.5.2

D

Daniel Berger

Hi all,

The Win32Utils Team is happy to announce the release of win32-service
0.5.2. Normally I don't announce minor releases, but this one contains
a fix for the dreaded thread blocking issue (you know, where you would
call Service.stop, and the your Daemon would just kinda hang).

Many thanks go to Patrick Hurley for his patch.

You can find it on the RAA (as win32-service) or on RubyForge (as part
of the win32utils project).

But wait! There are other goodies, too:

- I've added the Daemon#running? helper method for use within your
service_main code. So, your Daemon class should generally always look
something like this:

class Daemon
def service_main
while running?
if state == RUNNING # As opposed to IDLE or PAUSED
# Your loop here
else
sleep 1
end
end
end
end

- I've scrapped the old daemon example code in the 'example'
subdirectory (which didn't actually work) and replaced it with two
separate files - tdaemon.rb and tdaemon_ctl.rb. It's a simple service
that writes a short text message to your c:\ drive every 5 seconds.
Oh, and it actually works. :)

- There's now a gem (that we host). This is a C extension, so you'll
still need a C compiler to build and install the gem. If you don't
have a C compiler, you can download the shared object directly from the
project page at
http://rubyforge.org/frs/download.php/15016/service-0.5.2-vc6.so.
Rename the file to just "service.so" and copy it manually to
c:\ruby\lib\ruby\1.8\i386-mswin32\win32.

That's it for now. Enjoy!

The Win32Utils Team
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top