¹ØÓÚ delphi д·þÎñÆ÷³ÌÐòµÄÒÉÎÊ
delphi °ïÖúÎĵµ ¹ØÓÚ Service threads(·þÎñÏß³Ì) ÏÂÃæÁ½¶ÎÄÚÈÝ
Each service has its own thread (TServiceThread), so if your service application implements more than one service you must ensure that the implementation of your services is thread-safe. TServiceThread is designed so that you can implement the service in the TService OnExecute event handler. The service thread has its own Execute method which contains a loop that calls the service's OnStart and OnExecute handlers before processing new requests.
Because service requests can take a long time to process and the service application can receive simultaneous requests from more than one client, it is more efficient to spawn a new thread (derived from TThread, not TServiceThread) for each request and move the implementation of that service to the new thread's Execute method. This allows the service thread's Execute loop to process new requests continually without having to wait for the service's OnExecute handler to finish. The following example demonstrates.
Õâ¶Î»°µÄ´ó¸ÅÒâ˼ÊÇ˵:
ÿ¸ö·þÎñ¶¼ÓÐËü×Ô¼ºµÄÏß³Ì(TServiceThread),ËùÒÔÈç¹ûÒ»¸ö·þÎñÆ÷³ÌÐòʵÏÖÁ˶àÓÚÁ½¸ö·þÎñµÄ»°,¾ÍÒª¿¼ÂÇḬ̈߳²È«ÁË.service thread ÓÐ×Ô¼ºµÄExecute·½·¨,Ôڸ÷½·¨ÖÐÓÐÒ»¸öÑ»·,ÒÔÖØ¸´µ÷Ó÷þÎñµÄOnStartºÍOnExecuteÁ½Ê¼þµÄ´¦Àí³ÌÐò,ÕâÑù,ͨ¹ýÔÚOnStartºÍOnExecuteÁ½Ê¼þµÄ´¦Àí³ÌÐòÖÐд´úÂë¾Í¿ÉÒÔʵÏÖÕâ¸ö³ÌÐò.
ÒòΪ·þÎñÆ÷³ÌÐò¿ÉÄܽÓÊܵ½ºÜ¶à·þÎñÇëÇó,²¢ÇÒ´¦Àíÿ¸öÇëÇóµÄʱ¼ä¿ÉÄܺܳ¤,ËùÒÔ¶ÔÓ
Ïà¹ØÎÊ´ð£º
ÒÑÖªPython ÖУº
s = unicode("²âÊÔ", "gb2312")
s = u'\u6d4b\u8bd5'
print s
²âÊÔ
ÔÚDelphiÀïÃæÈçºÎ½«\u6d4b\u8bd5ÕâÑùµÄ»¹Ô³ÉGb2312µÄºº×ÖÄØ£¿
ÕÒµ½¸ö·½·¨
......
ÓÉÓÚ¿Í戶¶ËÓеÄÎļþ經³£¸üУ¨遠³ÌµÄ£¬²»ÊǾÖÓò網£©£¬
ËùÒÔÏë寫個×Ô動¸üÐ嵀 ³ÌÐò¡£
¿´網É쵀 ·½·¨資ÁÏ£¬ÖªµÀЩ·½·¨£¬µ«²»ÖªµÀ¾ß體Ôõô寫¡£
......
Çë½Ì¸÷·¸ßÊÖ¡£ÎäÁÖǰ±²¡£ÎÒ½«B.EXE×ö³É×ÊÔ´Îļþ£¬È»ºó¼Óµ½123.dllÖС£ÓÃA.EXEÀ´µ÷ÓÃ123.dllÖеÄB.EXE
Çë¸÷λǰ±²°ïæָ½ÌÏ¡£A.exeÈçºÎÀ´µ÷ÓÃdllÖеÄexe£¿´úÂëÓÖ¸ÃÈçºÎд£¿
ÎÞÈ˻شð£¿
×ö³É×ÊÔ´Î ......
Ò»°ã¶¼ÊÇÔõô½Ó»îµÄ£¿
ÊÕÈëÔõôÑù
sohu£¿soho£¿
sohu ¿ÉÄÜÊÇsmall office house unit
С°ì¹«ÊÒ£¬°Ñ¼Ò±ä³Éµ¥Î»¡£
È¥Íþ¿ÍÍø°¡,ºÜ¶à¸öÄØ,»¹ÓÐÍâ°üµÄÍøÕ¾
ѧϰѧϰ¡£
ÏÖÔÚDelphi×ö¶«Î÷²»ÐÐÁË,´¦ÓÚÌÔÌ×´ ......
×î½ü»»Á˼ҹ«Ë¾£¬ÓôÃÆµÄÊǹØÓÚDelphiµÄÎÊÌ⣬¹«Ë¾Ö®Ç°ÓõÄÒ²ÊÇD°æDelphi7ÆóÒµ°æµÄ¡£ºóÀ´±»ËÍÁËÂÉʺ¯ÒԺ󣬾ÍÇ¿ÖÆ¸ÄÓÃDelphi7¸öÈ˰棬¾ç˵Õâ¸ö°æ±¾ÊÇÃâ·Ñ°æ£¬»òÕß˵ºÜ±ãÒË£¬Èç¹û²é³öÀ´£¬¾ÍÂò¸öºÃÁË¡£ÕâÏ¿ɺ᣿àÁËÎ ......