1. °³¹ß/½ÇÇà Ç÷§Æû
(1) OS : Win10
(2) °³¹ßÅø : delphi 10.4
(3) »ç¿ë Database :
2. °³¹ß ÁßÀÎ ÇÁ·Î±×·¥ Component °³¹ß (Thread¸¦ ÀÌ¿ëÇÑ rest Åë½Å)
3. Áú¹® ³»¿ë
¾È³çÇϼ¼¿ä~ ^^
RestÅë½ÅÀ» ÇÏ´Â Component¸¦ °³¹ßÁßÀÔ´Ï´Ù. ¸ÖƼ¾²·¹µå¸¦ ÀÌ¿ëÇØ Äõ¸®¸¦ ´øÁö°í °á°ú¸¦ ¹ÞÀ¸·Á°í ÇÕ´Ï´Ù.
¾²·¹µå ½ÇÇà ¿Ï·á ½Ã PostMessage(FResultTo, UM_WORKERDONE, self.Handle, 0); ¸¦ ÀÌ¿ëÇؼ ¾²·¹µå°¡ ³¡³µ´Ù´Â°É
ÀÎÁöÇؼ ó¸®ÇÏ·Á°í Çϴµ¥¿ä
ÀÏ¹Ý Form¿¡¼ ¾ÆÁÖ Àß µË´Ï´Ù¸¸ ÄÞÆ÷³ÍÆ®ÈÇؼ ÇÏ·Á´Ï
procedure HandleThreadResult(var Message: TUMWorkerDone); message UM_WORKERDONE;
ÀÌ ÇÁ·Î½ÃÀú°¡ µ¿ÀÛÀ» ¾ÈÇÕ´Ï´Ù. ¤Ð¤Ð
TAgent_Thread = class(TComponent)
private
FQuery_Record: TQuery_Record;
FRunning: Boolean;
FThreads: array of TFThread;
FOwner: Tform;
protected
constructor create(Owner: TComponent); override;
procedure HandleThreadResult(var Message: TUMWorkerDone); message UM_WORKERDONE;
public
Execute_Count: Integer;
property Result: TQuery_Record read FQuery_Record;
procedure AddQuery(_Type: TQuerytype; _Query: string);
procedure svc;
end;
ÀÌ·¸°Ô ¼±¾ðµÇ¾î Àְŵç¿ä
Ȥ½Ã Component¿¡¼´Â ÀüÇô Message 󸮰¡ µÇÁö ¾ÊÀ»±î¿ä??
µÇ¸é °ü·Ã À¥ÆäÀÌÁö ¼Ò°³Á» ºÎŹµå·Áµµ µÉ±î¿ä?