EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: CA; ca_context_destoy and CA channels
From: Benjamin Franksen <[email protected]>
To: [email protected]
Date: Tue, 12 Apr 2005 19:49:18 +0200
On Monday 11 April 2005 16:56, Liyu, Andrei wrote:
> 	If I am not mistaken there are not couple features in current CA
> function interface.
> 	I can suppose that when you came to multithread CA you added
> get_current_context and attach functions. But there is not similar
> mechanism for ca_context_destoy.
> 	So I open first thread, create CA context, create first CA
> channel. Then I open second thread, attach to current CA context, create
> second CA channel.  ... Then I decide to close first CA channel and
> close context (???!!!). What is behavior CA library? I suppose second CA
> channel will be closed without normal procedure of closing second
> channel + its monitor?
> 	But I don't like to close second channel and CA context! Then I
> should check is that channel latest? I couldn't find suitable function
> in CA function API. Maybe get_current_context has something. But it is
> very deep.
> 	I have once way - hold tracks of my CA channels (minimum is
> global counter). Usually it could be done. But if program is mixture of
> different libraries and each library comes to CA library then it becomes
> impossible.

Hi Andrei,

I asked Jeff a similar thing a while ago. Specifically, I asked for a feature 
ca_detach_context that would be the opposite of ca_attach_context (and could 
also be used to detach the thread that created the context in the first 
place[*]). He seemed to be open to the suggestion but I don't know if it is 
planned to be included in the next epics release.

Ben

[*] ca_create_context in fact does two separate things: It creates a context 
and then attaches the calling thread to it; whereas ca_destroy_context first 
detaches context from the caling thread, then destroyes the context.

References:
CA; ca_context_destoy and CA channels Liyu, Andrei

Navigate by Date:
Prev: Re: EPICS Web Server Problems Andrew Johnson
Next: RE: CA; ca_context_destoy and CA channels Jeff Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: CA; ca_context_destoy and CA channels Liyu, Andrei
Next: RE: CA; ca_context_destoy and CA channels Jeff Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·