-Place yield in a few more places where there is more important work to be done at the time

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@753 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-03-11 13:10:58 +00:00
parent 9f018118ad
commit 5cf09a4701
3 changed files with 5 additions and 1 deletions

View File

@ -1158,6 +1158,7 @@ sub dompa {
}
print $out freeze([\%err]);
print $out "\nENDOFFREEZE6sK4ci\n";
yield;
return 1,"General error establishing SNMP communication";
}
my $tmp = $session->get([$mmprimoid.".1"]);
@ -1197,6 +1198,7 @@ sub dompa {
print $out freeze([\%output]);
print $out "\nENDOFFREEZE6sK4ci\n";
}
yield;
}
#my $msgtoparent=freeze(\@outhashes); # = XMLout(\%output,RootName => 'xcatresponse');
#print $out $msgtoparent; #$node.": $_\n";

View File

@ -4581,6 +4581,7 @@ sub donode {
print $outfd freeze([\%output]);
print $outfd "\nENDOFFREEZE6sK4ci\n";
}
yield;
#my $msgtoparent=freeze(\@outhashes);
# print $outfd $msgtoparent;
}

View File

@ -258,7 +258,7 @@ if ($inet6support) {
until ($quit) {
eval {
while (1) {
until ($select->can_read(5)) {if ($quit) { last; }} #Wait for data
until ($select->can_read(5)) { if ($quit) { last; }; yield; } #Wait for data
while ($select->can_read(0)) { #Pull all buffer data that can be pulled
$part = $socket->recv($data,1500);
($sport,$client) = sockaddr_in($part);
@ -629,6 +629,7 @@ sub dispatch_callback {
} else {
print $dispatch_parentfd freeze($rsp);
print $dispatch_parentfd "\nENDOFFREEZE6sK6xa\n";
yield; #This has to happen before next line could possibly work anyway
<$dispatch_parentfd>; #Block until parent acks data
}
}