Mistři v programování na #hovnokod

Delphi #625

if not MultiThread then
  begin
    GetName(@rec);
    result:=rec.fname;
  end
  else
  begin
    hThread:=CreateThread(0,0,@GetName,@rec,0,tmp);
    if WaitForSingleObject(hThread,100)=WAIT_TIMEOUT then
      TerminateThread(hThread,0)
    else
      result:=rec.fname;
    CloseHandle(hThread);
  end;

HovnoKod,