Forever ago (the beginning of the year) Michael Davidsaver sent me a long series of patches to cothread to improve the behaviour of the built-in Python socket libraries when using cothread (and to add some useful tests). These patches
were merged into the git repository (available by cloning
http://controls.diamond.ac.uk/downloads/python/cothread/cothread.git and now available on github at
https://github.com/Araneidae/cothread ) in April ... but I have been rather distracted with other work until now, so the release of this work has been delayed.
So, I would like to belatedly announce the release of cothread version 2-12, available at
http://controls.diamond.ac.uk/downloads/python/cothread/ and apologise to Michael for putting this off for so long.
Michael has also made some detailed proposals for allowing each thread to run its own cothread interpreter. Up to now it’s not been very clear to me what users would require of such a system. I presume the most important requirement would
be that cothread.catools channel access operations can be performed from any thread. Given the recent conversation on this topic it now seems a good time to make some progress on this (with further apologies to Michael for further putting off!)
I have a handful of questions, with suggested answers:
When camonitor is called, which thread is used for the callback? I would suggest that the thread which called camonitor is
always used for the callback.
Can a cothread waiting for an event on one thread be woken by a signal generated by another thread? This is probably straightforward enough to achieve and might be very valuable. This can already be achieved with the Callback()
method, but we’d like this to be transparent.
Can a cothread be allowed to migrate from one thread to another? Please say no, this is a scary idea, the implementation implications are already giving me the heebie-jeebies.
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom