> if I fire two ca_get_callback on the
> same channel in a row, do I get two callbacks, too?
yes
> Are there any combinations which will fail
> ("sorry, pv is active")?
No, and in fact if you produce {get, get callback,
or put callback} requests at a rate higher than
than they can be consumed by the channel's record then
the producer (the client app) will eventually block
until the record consumes enough buffer space to allow
for additional requests to be enqueued.
> so will interleaving two ca_put_callbacks also fail?
Negative, but the blocking scenario is however more likely
with put callback because, if a put callback is already in
progress for the same channel, the server's per-client
thread will wait until record processing (both synchronous
or asynchronous), and all side effect record processing
(both synchronous or asynchronous) finish before initiating
another put callback request.
In contrast get and get callback only need to obtain the db
scan lock before they can execute. In current versions of
EPICS a get/get callback do _not_ initiate record processing.
> What if I interleave a synchronous ca_get
> (i.e. I wait for completion using ca_pend or somesuch) with a
> ca_get or ca_get_callback issued by another thread?
Only a thread which has initialized the library in
non-preemptive callback mode can call ca_pend_io to
rendezvous with completion of a batch of no-callback
gets which have been requested; furthermore, it's not
allowed to attach additional threads to a non-preemptive
callback mode ca context.
So while one can mix ordinary get and callback get in
a non-preemptive mode ca context, a preemptive mode ca
context is a no-callback get free zone.
> Cheers (head smoking)
:-)
This probably raises some concerns about documentation
gaps so I created a bug entry at lp.
Jeff
______________________________________________________
Jeffrey O. Hill Email [email protected]
LANL MS H820 Voice 505 665 1831
Los Alamos NM 87545 USA FAX 505 665 5107
Message content: TSPA
With sufficient thrust, pigs fly just fine. However, this is
not necessarily a good idea. It is hard to be sure where they
are going to land, and it could be dangerous sitting under them
as they fly overhead. -- RFC 1925
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of Ben Franksen
> Sent: Tuesday, October 26, 2010 2:18 PM
> To: EPICS Techtalk
> Subject: Some Channel Access Questions
>
> I am again hacking on the sequencer internals and thereby came to ask
> myself how CA handles these cases:
>
> - multiple ca_put_callback calls on the same channel
> - multiple ca_get_callback calls on the same channel
> - multiple (blocking) ca_get calls on the same channel
> - a mixture of any of the above
>
> I assume exactly one channel here, which is possibly accessed from
> multiple threads.
>
> The only unproblematic case is the simple ca_put, as it is fire and
> forget; for ca_monitor I happen to know that multiple subscriptions are
> fine and each subscription get its own callback on each event. Do the
> other calls behave similarly, i.e. if I fire two ca_get_callback on the
> same channel in a row, do I get two callbacks, too? Are there any
> combinations which will fail ("sorry, pv is active")? I remember
> reading some time ago that only one *db*_put_callback can be active at
> a time on a record (on the IOC), so will interleaving two
> ca_put_callbacks also fail? What if I interleave a synchronous ca_get
> (i.e. I wait for completion using ca_pend or somesuch) with a ca_get or
> ca_get_callback issued by another thread?
>
> Cheers (head smoking)
> Ben
> --
> "Never confuse what is natural with what is habitual."
> -- attributed to Mahatma Gandhi
- Replies:
- Re: Some Channel Access Questions Ben Franksen
- References:
- Some Channel Access Questions Ben Franksen
- Navigate by Date:
- Prev:
Re: ChannelArchiver build problem with 3.14.11 on Suse linux Shankar, Murali
- Next:
Re: Some Channel Access Questions Ben Franksen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
<2010>
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Some Channel Access Questions Ben Franksen
- Next:
Re: Some Channel Access Questions Ben Franksen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
<2010>
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|