R
RGKJ
Unregistered / Unconfirmed
GUEST, unregistred user!
我写一个MIDAS应用服务器程序,当服务器运行一段时间后,客户端不断地调用一个RPC函数后
应用服务器占用CPU资源达99%.不知道是何缘故,如何解决.
我的中间层是这样写的:
function TQueueDataServer.ReCall(const HostName: WideString;
var BillID,
WinID, WaitNum: OleVariant): OleVariant;
var
ClientCall:TClientCall;
sBillID:string;
iWinID,iWaitNum:integer;
begin
BillID:='0000';
WinID:=0;
WaitNum:=0;
result:=false;
if isCalling or (not ServeStatus) then
exit;
ClientCall:=TClientCall.Create ;
try
ClientCall.InitCall(pServePP,pHostPP);
Result:=ClientCall.funReCall(HostName,sBillID,iWinID,iWaitNum);
BillID:=sBillID;
WinID:=iWinID;
WaitNum:=iWaitNum;
finally
ClientCall.Free;
end;
end;
应用服务器占用CPU资源达99%.不知道是何缘故,如何解决.
我的中间层是这样写的:
function TQueueDataServer.ReCall(const HostName: WideString;
var BillID,
WinID, WaitNum: OleVariant): OleVariant;
var
ClientCall:TClientCall;
sBillID:string;
iWinID,iWaitNum:integer;
begin
BillID:='0000';
WinID:=0;
WaitNum:=0;
result:=false;
if isCalling or (not ServeStatus) then
exit;
ClientCall:=TClientCall.Create ;
try
ClientCall.InitCall(pServePP,pHostPP);
Result:=ClientCall.funReCall(HostName,sBillID,iWinID,iWaitNum);
BillID:=sBillID;
WinID:=iWinID;
WaitNum:=iWaitNum;
finally
ClientCall.Free;
end;
end;