Created
November 16, 2012 21:30
-
-
Save dongliu/4091098 to your computer and use it in GitHub Desktop.
snapshot ca multi-threading
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get(d, pv_name, size, start, pid): | |
ch = ca.create_channel(pv_name, connect=False, auto_cb=False) | |
if ca.connect_channel(ch, timeout=1.0): | |
d[pv_name] = ca.get(ch, wait=True) | |
else: | |
d[pv_name] = 'not connected' | |
if len(d) == size: | |
print int(round((time.time() - start) * 1000)) | |
os.kill(pid, signal.SIGTERM) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment