Experimental Physics and Industrial Control System
Hi,
We are using JCA within our accelerator framework. Has anyone dealt
with thread safety issues relating to JCA? In particular, I am
concerned with switching between asynchronous and synchronous modes of
PendEvent. Sometimes we would like to write values immediately, while
other times we would like to package changes in a single batch. These
operations may take place concurrently in different threads.
The solution that we are considering here is to leave PendEvent in
synchronous mode and write a higher level wrapper to coordinate batch
writes. For example, value requests could be registered with the
coordinator. The user then sends a request to push the results to the
server and the coordinator wraps requests into a single pend event. In
order to prevent conflicts with other threads, we would have to provide
a lock to synchronize the pend events.
Has anyone already built such a solution? Is there a mechanism to use
JCA in a thread safe way? Are there plans for a thread safe version of
JCA in the future?
Additionally, it seems that within PendEvent.java, the variable m_exit
should be declared volatile to ensure that the while loop in the run()
method exits immediately when exit() is called.
thanks,
-tom pelaia
--
Tom Pelaia
SNS Project, 701 Scarboro Road, MS-6473, Oak Ridge, TN 37831
phone: (865) 574-6421, fax: (865)574-6617
- Replies:
- RE: JCA thread safety Jeff Hill
- Navigate by Date:
- Prev:
Making Records Invisible Susanna Jacobson
- Next:
Waveform Analysis Record Susanna Jacobson
- 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: Making Records Invisible Ned Arnold
- Next:
RE: JCA thread safety Jeff Hill
- 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