New ASync Demo
ASync Processing Demo - Features to Watch for
- Process using a dedicated background thread. This is the
same technique shown on March 10th. (Leave all checkboxes blank.)
- Inform the surfer:
- Using META REFRESH and redrawing status information (shown March 10th)
- By keeping the connection open and using JavaScript to update a status field- requires RUNISA.DLL
dated April 2, 1999.
- Flow of control
- Surfer can cancel the process
- Surfer can read other pages during processing
- Process using a globally shared background thread. (Check the last checkbox; recommended for high traffic)
- Process in N dedicated threads (Uncheck the last checkbox.)
- Process the work over multiple executions to
provide a percent-complete interface. (Check the "Process work over multiple executions" option.)
function TThreadInput.SendUpdate(PercentComplete:integer):Boolean;
var
a1:string;
begin
Result:=True;
if bStreaming
and assigned(Stream) then
with Stream do begin
if temp<>stream.name then begin
sleep(100);
temp:=stream.name;
end;
a1:=chForEach; // chunk-for-each
StringRepl(a1,'XXX',inttostr(PercentComplete));
if not SendBufferToMailBox(Name,'+',pchar(a1),length(a1)) then begin
Result:=not bAbort;
end;
end;
end;