[Checkins] SVN: lovely.remotetask/trunk/src/lovely/remotetask/ make the processing tread daemonic (with test)

Jodok Batlogg jodok at lovelysystems.com
Mon Aug 6 17:20:47 EDT 2007


thanks benji,

that bug was pretty annoying and we had no idea to fix it so far :)

jodok

On 06.08.2007, at 21:06, Benji York wrote:

> Log message for revision 78637:
>   make the processing tread daemonic (with test)
>
>
> Changed:
>   U   lovely.remotetask/trunk/src/lovely/remotetask/browser/README.txt
>   U   lovely.remotetask/trunk/src/lovely/remotetask/service.py
>
> -=-
> Modified: lovely.remotetask/trunk/src/lovely/remotetask/browser/ 
> README.txt
> ===================================================================
> --- lovely.remotetask/trunk/src/lovely/remotetask/browser/ 
> README.txt	2007-08-06 18:57:50 UTC (rev 78636)
> +++ lovely.remotetask/trunk/src/lovely/remotetask/browser/ 
> README.txt	2007-08-06 19:06:31 UTC (rev 78637)
> @@ -168,6 +168,16 @@
>>>> service.startProcessing()
>>>> transaction.commit()
>>>> sleep(1.5)
> +
> +Note that the processing thread is daemonic, that way it won't  
> keep the process
> +alive unnecessarily.
> +
> +  >>> import threading
> +  >>> for thread in threading.enumerate():
> +  ...     if thread.getName().startswith('remotetasks.'):
> +  ...         print thread.isDaemon()
> +  True
> +
>>>> service.stopProcessing()
>>>> transaction.commit()
>
>
> Modified: lovely.remotetask/trunk/src/lovely/remotetask/service.py
> ===================================================================
> --- lovely.remotetask/trunk/src/lovely/remotetask/service.py	 
> 2007-08-06 18:57:50 UTC (rev 78636)
> +++ lovely.remotetask/trunk/src/lovely/remotetask/service.py	 
> 2007-08-06 19:06:31 UTC (rev 78637)
> @@ -153,6 +153,7 @@
>          thread = threading.Thread(
>              target=processor, args=(self._p_jar.db(), path),
>              name='remotetasks.'+self.__name__)
> +        thread.setDaemon(True)
>          thread.running = True
>          thread.start()
>
>
> _______________________________________________
> Checkins mailing list
> Checkins at zope.org
> http://mail.zope.org/mailman/listinfo/checkins

--
"There should be one-- and preferably only one --obvious way to do it."
"Although that way may not be obvious at first unless you're Dutch."
   -- The Zen of Python, by Tim Peters

Jodok Batlogg, Lovely Systems
Schmelzhütterstraße 26a, 6850 Dornbirn, Austria
phone: +43 5572 908060, fax: +43 5572 908060-77


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2454 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/checkins/attachments/20070806/419ef2fe/smime.bin


More information about the Checkins mailing list