Hi Dirk,
On Tuesday 29 March 2011 09:45:08 Dirk Zimoch wrote:
> Unfortunately this behavior bites me now. After upgrading to a new OS
> and thus Tcl/Tk version, it turned out that monitors in our EPICS-Tcl
> interface did not work any more. This is because Tcl now can be compiled
> "thread aware" (which has been done by the distributor) and refuses to
> accept commands that come from a different thread.
Do you maintain your own Tcl interface to CA? I know that we still use Tcl/Tk
quite a lot here at APS — maybe if you were to post a question about CA and
Tcl rather than the CA internals you might get a more useful and positive
answer. I suspect that this problem might have already been solved, or there
will at least be other people interested in helping to solve it (collaboration
is almost always better than forking).
There are probably other ways to fix this too, you may be able to register the
callback thread with Tcl to allow yourself to run the command in that same
thread. However I'm pretty sure that CA runs callbacks from a separate thread
for each CA server, so you can't just register one thread, you have to be
prepared to do it lots of times. You may need to register and use an
epicsThreadPrivate variable to store any thread-specific data, and use
epicsAtThreadExit() to clean up when CA is closing down.
HTH,
- Andrew
--
An error is only a mistake if you don't learn from it.
When you learn something from it, it becomes a lesson.
- References:
- CA and threads Dirk Zimoch
- Re: CA and threads Andrew Johnson
- Re: CA and threads Dirk Zimoch
- Navigate by Date:
- Prev:
Re: CA and threads Robert Soliday
- Next:
Any upcoming EPICS training Jimmy Johnson
- 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: CA and threads Robert Soliday
- Next:
64-bit Channel Archiver Robert Petkus
- 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
|