l := ( ( (oW.AccessMode.FLast and fmShareExclusive) = fmShareExclusive ) or ( (oW.AccessMode.FLast and fmShareDenyWrite) = fmShareDenyWrite ) or FFileLock );
repeat
if not l then begin
Result := FNTXBag.NTXHandler.Lock(1000000000, 1);
if not Result then begin
Wait(0.001, false);
Inc(i);
if i = oW.WaitBusyRes then Exit;
end;
end else
Result := true;
until Result;
FFileLock := Result;
end else
Result := true;
end;
function TVKNTXIndex.FUnLock: boolean;
var
l: boolean;
oW: TVKDBFNTX;
begin
oW := TVKDBFNTX(FIndexes.Owner);
l := ( ( (oW.AccessMode.FLast and fmShareExclusive) = fmShareExclusive ) or ( (oW.AccessMode.FLast and fmShareDenyWrite) = fmShareDenyWrite ) );
if not l then
Result := FNTXBag.NTXHandler.UnLock(1000000000, 1)