RT如何使用threadvar定义线程专用变量?最重要的是本人不知道在哪个位置定义!
在execute过程中定义 
procedure TbThread.Execute;
threadvar
  i:integer;
begin
  inherited;
  if not Terminated then
  begin
    try
      safeObjs.LockList;
        i:=compute(1);//返回 11
        assignfile(txt,fpath);
        append(txt);
        writeln(txt,datetimetostr(now) + '  ' + inttostr(i));///////////////////////////报错了 
        closefile(txt);
      safeObjs.UnLockList;
    except
      safeObjs.UnLockList;
    end;
  end;
end;