ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/branches/udr/client/3.0/FB30Events.pas
(Generate patch)

Comparing ibx/branches/udr/client/3.0/FB30Events.pas (file contents):
Revision 380 by tony, Mon Jan 10 10:08:03 2022 UTC vs.
Revision 381 by tony, Sat Jan 15 00:06:22 2022 UTC

# Line 89 | Line 89 | type
89      destructor Destroy; override;
90  
91      {IEvents}
92 <    procedure WaitForEvent;
92 >    procedure WaitForEvent; override;
93      procedure AsyncWaitForEvent(EventHandler: TEventHandler); override;
94    end;
95  
# Line 215 | Line 215 | begin
215    begin
216      FEventHandler.WaitForEvent;
217      {$IFDEF EVENTDEBUG}  writeln('Event Handler Ends Wait ',Terminated); {$ENDIF}
218
218      if not Terminated  then
219        FOwner.EventSignaled;
220    end;
# Line 302 | Line 301 | begin
301    FAttachmentIntf := DBAttachment.AttachmentIntf;
302    FFirebird30ClientAPI := DBAttachment.Firebird30ClientAPI;
303    FSyncEventCallback := TEventhandlerInterface.Create(self,'Sync');
304 +  FAsyncEventCallback := TEventhandlerInterface.Create(self,'Async');
305 +  FEventHandlerThread := TEventHandlerThread.Create(self,FAsyncEventCallback);
306   end;
307  
308   destructor TFB30Events.Destroy;
# Line 317 | Line 318 | end;
318  
319   procedure TFB30Events.AsyncWaitForEvent(EventHandler: TEventHandler);
320   begin
320  {Seems like we have to create a new callback object each time to avoid empty events}
321  if assigned(FEventHandlerThread) then
322    TEventHandlerThread(FEventHandlerThread).Terminate;
323  if assigned(FAsyncEventCallback) then TEventhandlerInterface(FAsyncEventCallback).release;
324  FAsyncEventCallback := TEventhandlerInterface.Create(self,'Async');
325  FEventHandlerThread := TEventHandlerThread.Create(self,FAsyncEventCallback);
321    InternalAsyncWaitForEvent(EventHandler,FAsyncEventCallback);
322   end;
323  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines