EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: EPICS Python Question
From: Michael Davidsaver <[email protected]>
To: [email protected]
Date: Tue, 30 Sep 2014 10:38:07 -0400
>> For cothread, Yes, the only way to have multiple threads is to call its own Spawn method.

Ok, this is not true.  There is *nothing* about cothread which prevents
additional OS threads from being started.

The restriction is the the *first* thread to call "import cothread"
becomes special, and is the only one which can preform CA operations
(and other cooperative things).  Care must be taken to avoid blocking
syscalls on this thread.

This past spring I spent some time working to eliminate the special
thread restriction to make it easier to accommodate 3rd party libraries.
 The work in progress can be found here:

https://github.com/mdavidsaver/cothread/commits/master

This allows CA and other cooperative tasks in multiple OS threads.  It
still isn't finalized, and any input would be greatly appreciated.

> Right, and since it's hard to update third-party libraries which
already use the original Python threading to cothreads, that was a
blocker for me.

Some other work I did was to enhance the cothreads sockets wrapper to
the point that many of the Python standard library modules now work
transparently with cothread.  I've tested the http client/server and
SMTP client.

This has been merged, but not released.

Replies:
Re: EPICS Python Question Matt Newville
References:
EPICS Python Question Elder Matias
Re: EPICS Python Question Kasemir, Kay
Re: EPICS Python Question Shen, Guobao
Re: EPICS Python Question Kasemir, Kay

Navigate by Date:
Prev: Re: EPICS Python Question Kasemir, Kay
Next: Recommendations for high-power electrically quiet stepper motor driver Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: EPICS Python Question Kasemir, Kay
Next: Re: EPICS Python Question Matt Newville
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·