Indy 9
Example
InMainThread
  if (GAntiFreeze <> nil) and InMainThread then
  begin
    if ((not GAntiFreeze.OnlyWhenIdle) or AIdle or AOverride) and
      GAntiFreeze.Active then GAntiFreeze.Process;
  end;

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.