Hello Jeff & other CA experts,
The CA client reference manual says: "The user's connection state change
function will be run immediately from within ca_create_channel if the CA
client and the server are both hosted within the same address space (within
the same process)."
(1) From the above follows that if (for whatever reason) the connection
handler waits for an event that will happen only after ca_create_channel
completes, the application will be deadlocked. Is this also the case if CA is
used multi-threaded, i.e. initialized with the ca_enable_preemptive_callback
flag?
(2) Does a similar rule apply to ca_change_connection_event if previously
ca_create_channel was called with a NULL connection handler?
Btw, ca_change_connection_event is nowhere mentioned in the new CA client
reference. I hope it was just forgotten and is not deprecated.
(3) The manual further says: "If a connection state change call back function
is not installed when ca_create_channel is called (if a nil function pointer
is supplied) then the application program must wait for successful status
from ca_pend_io prior to using the channel for the first time."
I have some difficulty infering what "must" and "using" means in this case.
At first, i thought it means that the behavior of CA routines that take a chid
as argument is undefined if called with the chid returned from
ca_create_channel (with null connection handler) before ca_pend_io returns
success. However, this seems to contradict what is said in the description of
ca_create_channel: "The function ca_state(CHID) can be used to test the
connection state of a channel. Valid connections may be isolated from invalid
ones with this function if ca_pend_io() times out." This statement suggests
that at least ca_state seems to have a defined behavior.
So, what about calls to ca_change_connection_event? (I.e is it possible to
circumvent the above mentioned deadlock situation by calling
ca_create_channel without connection handler and afterwards call
ca_change_connection_event?)
Or am I completely wrong and all that "must" means is that the user should be
aware that certain CA routines will return an error code, saying that the
channel is disconnected??? I'm at a loss...
Ben
- Replies:
- Re: More CA questions Benjamin Franksen
- RE: More CA questions Jeff Hill
- Navigate by Date:
- Prev:
RE: rapid scans Mark Rivers
- Next:
Re: Allen Bradley PLC Kay-Uwe Kasemir
- 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:
RE: Allen Bradley PLC Rarback, Harvey
- Next:
Re: More CA questions Benjamin 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
|