search for: ruby_service_ctrl

Displaying 2 results from an estimated 2 matches for "ruby_service_ctrl".

2006 Jun 19
9
win32-service patch
Attached is a patch and my service.c if there is any difficulty applying the patch. I did the following: 1. Created a ruby thread (Ruby_Service_Ctrl), that polls against a simple integer value (protected by a critical section). I was worried this would be "expensive"; however, I found the rb_thread_polling method and it seems to work well. 2. When an event occurs in Service_Ctrl it sets the flag value. 3. If Ruby_Service_Ctrl finds...
2006 Dec 07
0
Fwd: win32-service problems with patch
...ngleObject(hStopCompletedEvent, 1000) != WAIT_OBJECT_0) + { + OutputDebugString(TEXT("service_main: waiting for stop completed event\n")); + } + // Stop the service. SetTheServiceStatus(SERVICE_STOPPED, NO_ERROR, 0, 0); } @@ -97,10 +91,10 @@ return result; } -VALUE Ruby_Service_Ctrl() +VALUE Ruby_Service_Ctrl(VALUE self) { while (WaitForSingleObject(hStopEvent,0) == WAIT_TIMEOUT) - { + { __try { EnterCriticalSection(&csControlCode); @@ -108,20 +102,22 @@ // Check to see if anything interesting has been signaled if (...