ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/fbintf/client/2.5/FB25Events.pas
(Generate patch)

Comparing ibx/trunk/fbintf/client/2.5/FB25Events.pas (file contents):
Revision 45 by tony, Tue Dec 6 10:33:46 2016 UTC vs.
Revision 47 by tony, Mon Jan 9 15:31:51 2017 UTC

# Line 112 | Line 112 | type
112  
113      {IEvents}
114      procedure WaitForEvent;
115 <    procedure AsyncWaitForEvent(EventHandler: TEventHandler);
115 >    procedure AsyncWaitForEvent(EventHandler: TEventHandler); override;
116    end;
117  
118   implementation
# Line 195 | Line 195 | begin
195   {$ENDIF}
196    inherited Create;
197   {$IFDEF WINDOWS}
198 <  FEventHandler := CreateEvent(PSa,false,true,nil);
198 >  FEventHandler := CreateEvent(PSa,false,false,nil);
199   {$ELSE}
200    CreateGuid(GUID);
201    FEventWaiting := TEventObject.Create(PSa,false,false,GUIDToString(GUID));
# Line 220 | Line 220 | begin
220    try
221      if FOwner.FResultBuffer <> nil then
222        Move(updated[0], FOwner.FResultBuffer[0], length);
223    {$IFDEF WINDOWS}
224    SetEvent(FEventHandler);
225    {$ELSE}
226    FEventWaiting.SetEvent;
227    {$ENDIF}
223    finally
224      FOwner.FCriticalSection.Leave
225    end;
226 + //  writeln('Set Event');
227 +  {$IFDEF WINDOWS}
228 +  SetEvent(FEventHandler);
229 +  {$ELSE}
230 +  FEventWaiting.SetEvent;
231 +  {$ENDIF}
232   end;
233  
234   procedure TEventhandlerInterface.WaitForEvent;
# Line 237 | Line 238 | begin
238    {$ELSE}
239    FEventWaiting.WaitFor(INFINITE);
240    {$ENDIF}
241 + //  writeln('Event Wait Ends');
242   end;
243  
244   procedure TEventhandlerInterface.CancelWait;
# Line 298 | Line 300 | begin
300      if FInWaitState then
301        IBError(ibxeInEventWait,[nil]);
302  
301    CreateEventBlock;
303      FEventHandler := EventHandler;
304      callback := @IBEventCallback;
305      with Firebird25ClientAPI do
# Line 317 | Line 318 | begin
318  
319    FInWaitState := true;
320    try
320    CreateEventBlock;
321      with Firebird25ClientAPI do
322         Call(isc_wait_for_event(StatusVector,@FDBHandle, FEventBufferlen,FEventBuffer,FResultBuffer));
323    finally

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines