add epicsThreadSleep between channel destroy and recreate

This commit is contained in:
Marty Kraimer
2013-11-21 06:24:28 -05:00
parent ce116eefb8
commit ac971042de
4 changed files with 1946 additions and 7 deletions

View File

@ -38,7 +38,7 @@
<h1>pvDatabaseCPP</h1>
<!-- Maturity: Working Draft or Request for Comments, or Recommendation, and date. -->
<h2 class="nocount">EPICS v4 Working Group, Working Draft, 20-Nov-2013</h2>
<h2 class="nocount">EPICS v4 Working Group, Working Draft, 21-Nov-2013</h2>
<dl>
<dt>Latest version:</dt>
<dd><a
@ -46,11 +46,11 @@
</dd>
<dt>This version:</dt>
<dd><a
href= "pvDatabaseCPP_20131120.html">pvDatabaseCPP20131120.html</a>
href= "pvDatabaseCPP_20131121.html">pvDatabaseCPP20131121.html</a>
</dd>
<dt>Previous version:</dt>
<dd><a
href= "pvDatabaseCPP_20131112.html">pvDatabaseCPP20131112.html</a>
href= "pvDatabaseCPP_20131120.html">pvDatabaseCPP20131120.html</a>
</dd>
<dt>Editors:</dt>
<dd>Marty Kraimer, BNL</dd>
@ -79,7 +79,7 @@ V4 control system programming environment:<br />
<h2 class="nocount">Status of this Document</h2>
<p>This is the 20-Nov-2013 version of of pvDatabaseCPP.</p>
<p>This is the 21-Nov-2013 version of of pvDatabaseCPP.</p>
</p>
<p>All channel methods except channelRPC, which is implemented
@ -97,6 +97,8 @@ But there are still two unresolved problems:
<dt>channel destroy and recreate</dt>
<dd>longArrayGet and longArrayPut fail if the channel is destroyed and
immediately recreated.
If epicsThreadSleep(1.0) is called between destroy and recreate then they work.
The current version of each does wait.
</dd>
</dl>
</p>
@ -1855,8 +1857,6 @@ under valgrind shows no memory leaks.</p>
<p>The possibly leaked is either 1 or 2 blocks.
It seems to be the same if clients are connected.
</p>
<h4>iterBetweenCreateChannel</h4>
<p>If this is not zero then the attempt to destroy and recreate the channel fails.</p>
<h2>Vector Performance</h2>
<p>This example demonstrates how array size effects performance.
The example is run as:</p>

File diff suppressed because it is too large Load Diff

View File

@ -255,6 +255,7 @@ void LongArrayChannelGet::run()
if(iterBetweenCreateChannel!=0) {
if(numChannelCreate>=iterBetweenCreateChannel) {
channel->destroy();
epicsThreadSleep(1.0);
ChannelProvider::shared_pointer channelProvider =
getChannelAccess()->getProvider(providerName);
channel = channelProvider->createChannel(

View File

@ -260,9 +260,11 @@ void LongArrayChannelPut::run()
if(iterBetweenCreateChannel!=0) {
if(numChannelCreate>=iterBetweenCreateChannel) {
channel->destroy();
epicsThreadSleep(1.0);
ChannelProvider::shared_pointer channelProvider =
getChannelAccess()->getProvider(providerName);
channel = channelProvider->createChannel(channelName,getPtrSelf(),0);
channel = channelProvider->createChannel(
channelName,getPtrSelf(),0);
event.wait();
if(isDestroyed) {
runReturned = true;