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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: PyEpics timeout behavior |
From: | Matt Newville <[email protected]> |
To: | "Guyotte, Greg S." <[email protected]> |
Cc: | "[email protected]" <[email protected]> |
Date: | Tue, 30 Aug 2016 10:47:58 -0500 |
I’m experiencing unexpected timeout behavior on PyEpics 3.2.4.
Using epics.PV, I experience double the expected timeout in all cases.
Using epics.caget(), the timeout value seems to be ignored and I
experience 5 seconds of delay when I ask for less than 5 seconds. With
epics.caget(), if I ask for more than 5 seconds of timeout, it works as
expected.
Here is a simple Python test case to reproduce:
import epics, time
waittime = 2
print "PyEpics %s test with timeout of %d seconds" %
(epics.__version__,waittime)
print "Test 1: using epics.PV"
time1 = time.time()
p = epics.PV("idontexist", connection_timeout=waittime)
time2 = time.time()
print " Time to create non-existent PV= ",time2-time1
val = p.get(timeout=waittime, use_monitor=False)
time3 = time.time()
print " Time to get non-existent PV= ",time3-time2
print ""
print "Test 2: using epics.caget"
time1 = time.time()
val = epics.caget("idontexist", timeout=waittime, use_monitor=False)
time2 = time.time()
print " Time to caget non-existent PV= ", time2-time1