Hi everyone,
New to stackless, but loving it so far :)
I have a small issue:
I use the uthread library to run my stuff, but not sure if it's related.
Basically, I would like to run a couple windows service in the
background, however since uthread.run() ( or stackless.run() i suppose )
blocks until end of execution, it never reaches the windows block until
event.
Also, I don't see any threads running.
Here's a basic run down of what i do:
define tasklet functions
create Tasklets
class SERVER(win32serviceutil.ServiceFramework):
"""NT Service."""
_svc_name_ = "SERVER"
_svc_display_name_ = "SERVER"
# Only exists on Windows 2000 or later, ignored on windows NT
_svc_description_ = "Python Web Service"
def __init__(self, args):
win32serviceutil.ServiceFramework.__init__(self, args)
# create an event that SvcDoRun can wait on and SvcStop
# can set.
self.stop_event = win32event.CreateEvent(None, 0, 0, None)
def SvcDoRun(self):
serviceName = self._svc_name_
uthread.run()
# now, block until our event is set...
win32event.WaitForSingleObject(self.stop_event,
win32event.INFINITE)
Seeing this again, maybe i need to create the tasklets within the class
? Or is the win32Event.Wait incompatible withstacklessand i need to find
another way?
--Hans
_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless