Arsip: thread di delphi....

 
user image
more 17 years ago

yadi

bro...diriku mau nanya nih.... cara buat thread di delphi... yang katanya buat percepat suatu proses....aplikasi boleh ya,,,, kalo misalnya ada contoh codingnya nih... thank's...ya... :)
user image
more 17 years ago

madi

Di Sample delphi 6 sudah ada silahkan dicari..., atau pake component jvcl ada juga
user image
more 17 years ago

yadi

Bro...@madi thank's nih.... but komponen jvcl bisa jelasin lagi ga ni.,, udah browse ke google masih kurang ngerti nih.. boleh ya,,,
user image
more 17 years ago

DelphiExpert

lha wong di sample2 delphi udah berserakan koq, dasar lu kurang explore!

type
  TSimpleThread = class(TThread)
  private
    FParam: Variant;
  protected
    procedure Execute; override;
  public
    constructor Create(AProcessParam: Variant); reintroduce;
  end;
implementation
constructor TSimpleThread.Create((AProcessParam: Variant);
begin
  inherited Create(True); // create suspended
  FParam:= AProcessParam;
  FreeOnTerminate:= True; // options, auto destroy atau kaga'
  Resume; // activate thread
end;
procedure TSimpleThread.Execute;
begin
  // do your task with FParam value here...
  SomeTask; 
  // or this is a daemon process....
  while not Terminated do
  begin
    // do something
  end;
  Terminated:= True;
end;
cara gunain:

  TSimpleThread.Create('MyName is didi');
  // with FreeOnTerminated:= True
  // anda dapat melupakan instance thread ini
end;
user image
more 17 years ago

yadi

ma kasih banyak....bro @DE i'll try do it.... maaf nih kalo banyak nanya ke forum nih... semoga yang maha kuasa membalasnya aminn.....
user image
more 17 years ago

madi

alamat jvcl delphi-jedi.org
user image
more 17 years ago

muktaf

nambahin bisa ke jvcl.sourceforge.net + source
user image
more 17 years ago

cikumiyu

lha wong di sample2 delphi udah berserakan koq, dasar lu kurang explore!
He he he ....
user image
more 16 years ago

old_shutterhand

// or this is a daemon process....
@DE matur nuwun sebelumnya saya pake ttimer untuk create and kill thread--> daemon namun effectnya ketika dijalankan selama beberapa jam memory menjadi penuh padahal pada debugging mode (D2007) pada event lognya thread secara bergantian (pid sama) di create dan di kill. matur nuwun mbah DE
user image
more 16 years ago

DelphiExpert

@old_shutterhand:
// or this is a daemon process....
@DE matur nuwun sebelumnya saya pake ttimer untuk create and kill thread--> daemon namun effectnya ketika dijalankan selama beberapa jam memory menjadi penuh padahal pada debugging mode (D2007) pada event lognya thread secara bergantian (pid sama) di create dan di kill. matur nuwun mbah DE
inggih... sami-sami :mrgreen:
more ...
  • Pages:
  • 1
  • 2
Share to

AI Forward

🚀 We're thrilled to partner with Alibaba Cloud for "AI Forward - Alibaba Cloud Global Developer Summit 2025" in Jakarta! Join us and explore the future of AI. Register now: https://int.alibabacloud.com/m/1000400772/
#AlibabaCloud #DeveloperSummit #Jakarta #AIFORWARD

Random Topic

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com