锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品成人无码久久久久久 ,一本色综合网久久,国产伊人久久http://www.shnenglu.com/ace/<table style="border:1px solid #aa0033; font-size:small" align=center> <tr> <td rowspan=3> </td> <td colspan=2 align=center><b>璁㈤槄 ace-china</b></td> </tr> <form action="http://groups.google.com/group/ace-china/boxsubscribe"> <input type=hidden name="hl" value="zh-CN"> <tr> <td>鐢靛瓙閭歡錛?<input type=text name=email></td> <td> <table style="background-color:#ffcc33;padding:2px;border:2px outset #ffcc33;"> <tr> <td> <input type=submit name="sub" value="璁㈤槄"> </td> </tr> </table> </td> </tr> </form> <tr><td colspan=2 align=center> 嫻忚瀛樹簬 <a >groups.google.com</a> 涓婄殑<a >鎵鏈夊笘瀛?lt;/a> </td></tr> </table>zh-cnThu, 08 May 2025 19:51:15 GMTThu, 08 May 2025 19:51:15 GMT60嬈㈣繋璁塊棶鎴戠殑鏂扮綉绔?/title><link>http://www.shnenglu.com/ace/archive/2012/07/02/181149.html</link><dc:creator>Stone Jiang</dc:creator><author>Stone Jiang</author><pubDate>Mon, 02 Jul 2012 09:03:00 GMT</pubDate><guid>http://www.shnenglu.com/ace/archive/2012/07/02/181149.html</guid><wfw:comment>http://www.shnenglu.com/ace/comments/181149.html</wfw:comment><comments>http://www.shnenglu.com/ace/archive/2012/07/02/181149.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/ace/comments/commentRss/181149.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/ace/services/trackbacks/181149.html</trackback:ping><description><![CDATA[<div>嬈㈣繋璁塊棶鎴戠殑鏂扮綉绔?br />TAO宸ヤ綔瀹?nbsp;<a >http://www.tao-studio.net<br /><br /><br /></a></div><img src ="http://www.shnenglu.com/ace/aggbug/181149.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/ace/" target="_blank">Stone Jiang</a> 2012-07-02 17:03 <a href="http://www.shnenglu.com/ace/archive/2012/07/02/181149.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>浼樺厛綰у弽杞?/title><link>http://www.shnenglu.com/ace/archive/2009/09/15/96240.html</link><dc:creator>Stone Jiang</dc:creator><author>Stone Jiang</author><pubDate>Tue, 15 Sep 2009 09:15:00 GMT</pubDate><guid>http://www.shnenglu.com/ace/archive/2009/09/15/96240.html</guid><wfw:comment>http://www.shnenglu.com/ace/comments/96240.html</wfw:comment><comments>http://www.shnenglu.com/ace/archive/2009/09/15/96240.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/ace/comments/commentRss/96240.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/ace/services/trackbacks/96240.html</trackback:ping><description><![CDATA[<p>Priority Inversion 浼樺厛綰у弽杞槸宓屽叆寮忓疄鏃剁郴緇熼噷闈㈢殑涓涓粡鍏哥殑闂銆傜畝鍗曟弿榪頒竴涓嬭繖涓棶棰橈細鏈変笁涓紭鍏堢駭涓嶅悓鐨則ask,A,B,C; A鐨勪紭鍏堢駭鏈楂橈紝B嬈′箣錛孋鏈浣庛傚叾涓瑼鍜孋鏈夊叡浜殑涓寸晫鍖恒傚鏋淐宸茶繘鍏ヤ復鐣屽尯錛岄偅涔圓鍦ㄨ繘鍏ヨ繘鍏ヤ復鐣屽尯涔嬪墠錛屽氨浼氳闃誨銆倀ask B鏈夊彲鑳芥墦鏂瑿鑰岃繘鍏ヨ繍琛岀姸鎬侊紝榪欐牱C浠涔堟椂鍊欎粠涓寸晫鍖洪鍑猴紝灝辨槸涓涓湭鐭ョ殑鏃墮棿銆侫鍙湁C浠庝復鐣屽尯閫鍑哄悗鎵嶈兘琚皟搴︼紝A琚樆濉炵殑鏃墮棿涔熸槸鏈煡鐨勩傝繖鏍鳳紝浣庝紭鍏堢駭鐨凚鍏堜簬楂樹紭鍏堢駭鐨凙琚皟搴︼紝浼樺厛綰у彂鐢熶簡閫嗚漿銆?<br>榪欎釜闂鍦ㄤ竴鑸殑鎿嶄綔緋葷粺閲岄潰涓嶆槸涓涓弗閲嶇殑闂錛屾渶澶欰琚闃誨浜嗕竴孌墊椂闂淬備絾鏄紝鍦ㄥ疄鏃剁郴緇熼噷闈紝濡傛灉涓涓換鍔″湪瑙勫畾鐨勬椂闂撮噷闈㈡病鏈夎璋冨害榪愯錛岀郴緇熷氨鐩稿綋浜庡け璐ヤ簡錛屽彲鑳藉紩鍙戠郴緇熷穿婧冦?<br>瑙e喅榪欎釜闂鏈変袱縐嶆墜孌碉細 <br>1錛歅riority inheritance(浼樺厛綰х戶鎵?錛屽鏋滀竴涓珮浼樺厛綰х殑task琚樆濉烇紝涓庡畠鍏變韓涓寸晫鍖虹殑浣庝紭鍏堢駭鐨則ask鍦ㄨ繘鍏ヤ復鐣屽尯鍚庯紝浼樺厛綰у氨浼氱戶鎵塊珮浼樺厛綰ask鐨勪紭鍏堢駭錛屼繚璇佸畠涓嶄細琚叾浠栦紭鍏堢駭嬈¢珮鐨勪換鍔℃墦鏂備粠涓寸晫鍖洪鍑哄悗錛孋鐨勪紭鍏堢駭鎭㈠姝e父銆?<br>2錛欰 priority ceiling錛堟渶楂樹紭鍏堢駭錛夛紝緇欎復鐣屽尯鍒嗛厤鏈楂樹紭鍏堢駭錛屽鏋滀竴涓猼ask榪涘叆涓寸晫鍖猴紝灝辨妸涓寸晫鍖虹殑浼樺厛綰ц祴緇欏畠錛屽凡淇濊瘉瀹冧笉浼氳鎵撴柇銆備粠涓寸晫鍖洪鍑哄悗錛宼ask鐨勪紭鍏堢駭鎭㈠姝e父銆?/p> <p>瀹炴椂鎿嶄綔緋葷粺鐨勪竴涓壒鐐瑰氨鏄紝涓涓疄鏃朵換鍔★紝浼氬湪瑙勫畾鐨勬椂闂村唴寰楀埌鍝嶅簲錛屽茍涓斿湪瑙勫畾鐨勬椂闂村唴瀹屾垚浠誨姟銆傛墍浠ワ紝涓鍒囦笉鍙鐭ョ殑鍔ㄤ綔閮芥槸鏈夊鐨勩?/p> <p>鏈夊叴瓚e彲浠ョ湅鐪嬩笅闈袱涓摼鎺ワ細 <br><a >http://en.wikipedia.org/wiki/Priority_inversion</a></p> <p> </p> <h3>Priority inversion</h3> <h5>From Wikipedia, the free encyclopedia</h5> <p>Jump to: <a >navigation</a>, <a >search</a></p> <p>In <a >scheduling</a>, <b>priority inversion</b> is the scenario where a low priority <a >task</a> holds a shared <a >resource</a> that is required by a high priority task. This causes the execution of the high priority task to be blocked until the low priority task has released the resource, effectively "inverting" the relative priorities of the two tasks. If some other medium priority task, one that does not depend on the shared resource, attempts to run in the interim, it will take precedence over both the low priority task <i>and</i> the high priority task.</p> <p>In some cases, priority inversion can occur without causing immediate harm鈥攖he delayed execution of the high priority task goes unnoticed, and eventually the low priority task releases the shared resource. However, there are also many situations in which priority inversion can cause serious problems. If the high priority task is left <a >starved</a> of the resources, it might lead to a system malfunction or the triggering of pre-defined corrective measures, such as a <a >watch dog timer</a> resetting the entire system. The trouble experienced by the Mars lander "<a >Mars Pathfinder</a>"<sup><a >[1]</a></sup><sup><a >[2]</a></sup> is a classic example of problems caused by priority inversion in <a >realtime</a> systems.</p> <p>Priority inversion can also reduce the <a >perceived performance</a> of the system. Low priority tasks usually have a low priority because it is not important for them to finish promptly (for example, they might be a <a >batch job</a> or another non-interactive activity). Similarly, a high priority task has a high priority because it is more likely to be subject to strict time constraints鈥攊t may be providing data to an interactive user, or acting subject to realtime response guarantees. Because priority inversion results in the execution of the low priority task blocking the high priority task, it can lead to reduced system responsiveness, or even the violation of response time guarantees.</p> <p>A similar problem called <a >deadline interchange</a> can occur within <a >Earliest Deadline First Scheduling</a> (EDF).</p> <h4>Contents</h4>[<a >hide</a>] <ul> <li><a >1 Solutions</a> <li><a >2 See also</a> <li><a >3 Notes</a> <li><a >4 References</a> <li><a >5 External links</a> </li></ul> <p><a name="Solutions"></a></p> <h4>[<a >edit</a>] Solutions</h4> <p>The existence of this problem has been known since the 1970s, but there is no fool-proof method to predict the situation. There are however many existing solutions, of which the most common ones are:</p> <dl> <dt>Disabling all interrupts to protect critical sections <dd>When disabled interrupts are used to prevent priority inversion, there are only two priorities: <i>preemptible</i>, and <i>interrupts disabled.</i> With no third priority, inversion is impossible. Since there's only one piece of lock data (the interrupt-enable bit), misordering locking is impossible, and so deadlocks cannot occur. Since the critical regions always run to completion, hangs do not occur. Note that this only works if all interrupts are disabled. If only a particular hardware device's interrupt is disabled, priority inversion is reintroduced by the hardware's prioritization of interrupts. A simple variation, "single shared-flag locking" is used on some systems with multiple CPUs. This scheme provides a single flag in shared memory that is used by all CPUs to lock all inter-processor critical sections with a <a >busy-wait</a>. Interprocessor communications are expensive and slow on most multiple CPU systems. Therefore, most such systems are designed to minimize shared resources. As a result, this scheme actually works well on many practical systems. These methods are widely used in simple <a >embedded systems</a>, where they are prized for their reliability, simplicity and low resource use. These schemes also require clever programming to keep the critical sections very brief, under 100 microseconds in practical systems. Many software engineers consider them impractical in general-purpose computers. <dd>Arguably, these methods are similar to priority ceilings. </dd></dl> <dl> <dt>A <a >priority ceiling</a> <dd>With priority ceilings, the shared <a >mutex</a> process (that runs the operating system code) has a characteristic (high) priority of its own, which is assigned to the task locking the mutex. This works well, provided the other high priority task(s) that try to access the mutex does not have a priority higher than the ceiling priority. </dd></dl> <dl> <dt><a >Priority inheritance</a> <dd>Under the policy of priority inheritance, whenever a high priority task has to wait for some resource shared with an executing low priority task, the low priority task is assigned the priority of the highest waiting priority task for the duration of its own use of the shared resource, thus keeping medium priority tasks from pre-empting the (originally) low priority task, and thereby effectively the waiting high priority task as well. </dd></dl> <p><a name="See_also"></a></p> <h4>[<a >edit</a>] See also</h4> <ul> <li><a >Starvation</a> <li><a >Pre-emotive multitasking</a> <li><a >Non-blocking synchronization</a> <li><a >Read-copy-update</a> <li><a >Priority inheritance</a> <li><a >Priority ceiling</a> <li><a >Nice (Unix)</a> </li></ul> <p><a name="Notes"></a></p> <h4>[<a >edit</a>] Notes</h4> <ol> <li><b><a >^</a></b> <a >What Really Happened on Mars</a> by Glenn Reeves of the JPL Pathfinder team <li><b><a >^</a></b> <a >Explanation of priority inversion problem experienced by Mars Pathfinder</a> </li></ol> <p><a name="References"></a></p> <h4>[<a >edit</a>] References</h4> <ul> <li><a Experience with Processes and Monitors in Mesa"</a> by <a >Butler W. Lampson</a> and <a >David D. Redell</a>, <i><a >CACM</a></i> 23(2):105-117 (Feb 1980) - One of the first (if not the) first papers to point out the priority inversion problem. Also suggested disabling interrupts and the priority ceiling protocol as solutions, noting that the former of these two cannot not tolerate page faults while in use. </li></ul> <p><a name="External_links"></a></p> <h4>[<a >edit</a>] External links</h4> <ul> <li><a >Description from FOLDOC</a> <li><a >Citations from CiteSeer</a> <li><a >IEEE Priority Inheritance Paper by Sha, Rajkumar, Lehoczky</a> </li></ul> <p>Retrieved from "<a </p><img src ="http://www.shnenglu.com/ace/aggbug/96240.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/ace/" target="_blank">Stone Jiang</a> 2009-09-15 17:15 <a href="http://www.shnenglu.com/ace/archive/2009/09/15/96240.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>濡備綍鍦╓indows,Visual C++涓嬭幏鍙栥侀厤緗拰鏋勫緩ACE鍙奣AO?http://www.shnenglu.com/ace/archive/2008/07/22/56808.htmlStone JiangStone JiangMon, 21 Jul 2008 17:00:00 GMThttp://www.shnenglu.com/ace/archive/2008/07/22/56808.htmlhttp://www.shnenglu.com/ace/comments/56808.htmlhttp://www.shnenglu.com/ace/archive/2008/07/22/56808.html#Feedback0http://www.shnenglu.com/ace/comments/commentRss/56808.htmlhttp://www.shnenglu.com/ace/services/trackbacks/56808.htmlQ:濡備綍鍦╓indows,Visual C++涓嬭幏鍙栥侀厤緗拰鏋勫緩ACE鍙奣AO?
A:鏈現AQ鎻愪緵 鍦╓indows涓嬬敤VisualC++瀹夎鍜屾瀯寤篈CE+TAO鐨勫熀鏈鏄庛?br>  ACE+TAO涔熼傜敤浜庡叾瀹冧富瑕佺殑鎿嶄綔緋葷粺錛屼緥濡傦細Linux, Solaris,
  HP-UX, AIX鍜孴ru64,榪橀傜敤浜庝竴浜涘疄鏃訛紝宓屽叆寮忔搷浣滅郴緇燂紝濡?br>  VxWorks,LynxOS, timeSys Linux鍜學indows CE銆傚湪Windows涓紝
  ACE+TAO涔熷彲浠ョ敤Borland C++緙栬瘧鍣ㄦ瀯寤恒?/p>


 .紜歡瑕佹眰錛?br>    - CPU錛?Intel X86 P3 500 MHz鎴栨洿蹇?br>    - 鍐呭瓨錛?12MB (鏇村鍐呭瓨鍙互鎻愰珮緙栬瘧閫熷害)
    - 紜洏絀洪棿錛?256MB浜や簰絀洪棿+ 250MB鑷蟲暟GB絀洪棽絀洪棿錛堝彇鐦婁簬鎮ㄨ鏈?br>      澶氬皯闇瑕佹瀯寤?

 .鎿嶄綔緋葷粺瑕佹眰錛?br>    - Windows 2000, 2003,鎴朮P  (鍏跺疄Vista涓嬫垜璇曡繃涔熷彲浠?
 
 
 .C++緙栬瘧鍣ㄨ姹傦細
  - Microsoft Visual C++ 6.0 SP5 (鏂扮増鏈殑ACE+TAO宸蹭笉鏀寔VC6浜?
  - Microsoft Visual C++ 7.1 (VS2003)
  - Microsoft Visual C++ 8.0 (VS2005)
  - Microsoft Visaul C++ 9.0 (VS2008)

 .鍏朵粬杞歡瑕佹眰錛?br>  - WinZIP鎴栫被浼肩殑瑙e帇緙╁伐鍏?br>  - ActiveState Perl v5.6.1鎴栨洿鏂扮増鏈紙鎺ㄨ崘錛屼笉鏄繀闇錛?/p>

 鑾峰彇鍜屽畨瑁匒CE+TAO
  1. 浠庝笅杞絆CI TAO 1.5a鐨勬渶鏂拌ˉ涓?br>     http://download.ociweb.com/TAO-1.5a/ACE+TAO-1.5a_with_latest_patches.zip
    鎴栦粠ACE+TAO鐨勫畼鏂圭綉绔欎笂涓嬭澆鏈鏂癇eta鐗?br>     http://download.dre.vanderbilt.edu/
  2. 鎶婁笂榪板帇緙╂枃浠墮噴鍏ヨ嚦娌℃湁絀烘牸鐨勭洰褰曚腑錛堜緥濡傦細C:\ACE_wrappers)
  3. 璁劇疆鐜鍙橀噺 ACE_ROOT,TAO_ROOT鍜孭ATH.
     渚嬪錛氬鏋淎CE+TAO瀹夎鑷矯:\ACE_wrappers,鍒欎笂榪扮幆澧冨彉閲忓涓嬶細
     * ACE_ROOT=C:\ACE_wrappers
     * TAO_ROOT=%ACE_ROOT%\TAO
     * PATH璺緞闇瑕佸寘鍚? %ACE_ROOT%\bin;%ACE_ROOT%\lib
  4. 鍦?%ACE_ROOT%\ace 鐩綍涓璫onfig.h鏂囦歡錛屾枃浠跺唴瀹規槸錛?br>     #define ACE_DISABLE_WIN32_ERROR_WINDOWS
     #define ACE_HAS_STANDARD_CPP_LIBRARY 1
     #define ACE_DISABLE_WIN32_INCREASE_PRIORITY
     #include "ACE/config-win32.h"
  5. %TAO_ROOT%\TAOACE.sln
      鍦ˋCETAO宸ヤ綔鍖?workspace)涓殑欏圭洰鏋勫緩ACE鍜孴AO搴擄紝TAO_IDL緙栬瘧鍣ㄣ乬perf,
      ORB鏈嶅姟搴撳拰鍙墽琛屾枃浠朵互鍙婁竴浜涘叕鍏辯殑瀹炵敤宸ュ叿(utilities)銆備粬浠笉鍖呭惈
      紺轟緥銆佹祴璇曞拰鎬ц兘嫻嬭瘯銆傚簱鏂囦歡灝嗗畨瑁呰嚦%ACE_ROOT%\lib錛屼竴浜涘彲鎵ц鏂囦歡灝嗗畨瑁?br>     鑷?ACE_ROOT%\bin涓紝鍏朵粬錛圤RB鏈嶅姟鐨勫彲鎵ц鏂囦歡錛夊皢瀹夎鍦ㄤ粬浠嚜宸辯殑婧愪唬鐮佹墍鍦?br>     鐩綍涓?br> 
     濡傛灉鎮ㄤ笉鎯沖叏閮ㄥ緩璁甌AOACE workspace鐨勫簱鍜屽彲鎵ц鏂囦歡錛屾垜浠緩璁瀯寤篘aming_Service
     欏圭洰銆傚湪寮鍙戣嚜宸辯殑搴旂敤紼嬪簭閲屽父浼氱敤鍒板畠銆?/p>

     濡傛灉涓婅堪鐨剋orkspace鏂囦歡涓嶅瓨鍦紝閭d箞浣犻渶瑕佺敤MakeProjectCreator (MPC)鏉ョ敓鎴愬畠銆?br>     鍛戒護琛屽涓嬶紙闇瑕丳erl錛屼笂闈㈠凡鍒楀嚭錛夛細
     cd %TAO_ROOT%
     %ACE_ROOT%\bin\mwc.pl -type vc71 TAOACE.mwc -- 鎴愮敓visual stuido 2003 workspace鏂囦歡
     %ACE_ROOT%\bin\mwc.pl -type vc8 TAOACE.mwc  -- 鎴愮敓visual stuido 2005 workspace鏂囦歡
     %ACE_ROOT%\bin\mwc.pl -type vc9 TAOACE.mwc  -- 鎴愮敓visual stuido 2008 workspace鏂囦歡


    
    

 



Stone Jiang 2008-07-22 01:00 鍙戣〃璇勮
]]>
嬈㈣繋璁塊棶www.ace-tao.org/bbshttp://www.shnenglu.com/ace/archive/2007/12/05/37843.htmlStone JiangStone JiangWed, 05 Dec 2007 04:59:00 GMThttp://www.shnenglu.com/ace/archive/2007/12/05/37843.htmlhttp://www.shnenglu.com/ace/comments/37843.htmlhttp://www.shnenglu.com/ace/archive/2007/12/05/37843.html#Feedback0http://www.shnenglu.com/ace/comments/commentRss/37843.htmlhttp://www.shnenglu.com/ace/services/trackbacks/37843.htmlwww.ace-tao.org/bbs




Stone Jiang 2007-12-05 12:59 鍙戣〃璇勮
]]>
浣跨敤vs2005(vc8)緙栬瘧log4cpp-0.3.5rc3http://www.shnenglu.com/ace/archive/2007/01/27/18050.htmlStone JiangStone JiangSat, 27 Jan 2007 08:38:00 GMThttp://www.shnenglu.com/ace/archive/2007/01/27/18050.htmlhttp://www.shnenglu.com/ace/comments/18050.htmlhttp://www.shnenglu.com/ace/archive/2007/01/27/18050.html#Feedback0http://www.shnenglu.com/ace/comments/commentRss/18050.htmlhttp://www.shnenglu.com/ace/services/trackbacks/18050.html

浣跨敤vs2005(vc8)緙栬瘧log4cpp-0.3.5rc3

闂錛氱敱浜巐og4cpp-0.3.5rc3浠呮彁渚涗簡vc6鐨勫伐紼嬫枃浠訛紝鍥犳錛屼嬌鐢╲s2005鎵撳紑鍚庯紝闇瑕佽繘琛岃漿鎹€備絾鏄漿鎹㈠悗錛屼笉鑳芥紜紪璇戯紝鎻愮ずCustom Build Step鏃跺嚭鐜頒簡閿欒銆?/p>

鍒嗘瀽錛氬洜涓簂og4cpp鍦ㄧ敓鎴怤TEventLogAppender.dll鏃訛紝闇瑕佽繛鎺TEventLogCategories.mc鏂囦歡銆傛墍浠ワ紝欏圭洰璁劇疆浜嗚嚜瀹氫箟鐨勭敓鎴愭楠ゅ幓鐢熸垚NTEventLogAppender.dll銆備絾浠巚c6鐨勫伐紼嬫枃浠惰漿鎹㈡椂錛岃繖浜涙楠ゅ嵈娌℃湁姝g‘鐨勮漿鎹㈣繃鏉ャ備粠鑰屽嚭鐜頒笂榪伴棶棰樸?/p>

瑙e喅鏂規硶錛氶噸鏂板~鍐機ustom Build Step欏廣?/p>

鍏朵腑錛孋ommandLine濉啓浠ヤ笅鍐呭錛?/p>

if not exist $(OutDir) md $(OutDir)
"mc.exe" -h $(OutDir) -r $(OutDir) $(SolutionDir)NTEventLogCategories.mc
"RC.exe" -r -fo $(OutDir)\$(InputName).res $(ProjectDir)\$(InputName).rc
"link.exe" /MACHINE:IX86 -dll -noentry -out:$(OutDir)\NTEventLogAppender.dll $(OutDir)\$(InputName).res

Outputs濉啓錛?(OutDir)\NTEventLogAppender.dll

閫傜敤鑼冨洿錛歭og4cpp欏圭洰銆乴og4cppDLL欏圭洰鐨凞ebug鍜孯elease閰嶇疆銆傚悓鏃訛紝璇ユ柟娉曢傜敤浜巚s2003(vc7.1)銆?/p>



Stone Jiang 2007-01-27 16:38 鍙戣〃璇勮
]]>
TAO(The ACE ORB)綆浠?/title><link>http://www.shnenglu.com/ace/archive/2006/12/04/15959.html</link><dc:creator>Stone Jiang</dc:creator><author>Stone Jiang</author><pubDate>Mon, 04 Dec 2006 02:24:00 GMT</pubDate><guid>http://www.shnenglu.com/ace/archive/2006/12/04/15959.html</guid><wfw:comment>http://www.shnenglu.com/ace/comments/15959.html</wfw:comment><comments>http://www.shnenglu.com/ace/archive/2006/12/04/15959.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/ace/comments/commentRss/15959.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/ace/services/trackbacks/15959.html</trackback:ping><description><![CDATA[<p>TAO(The <a title="" >ACE</a> ORB)綆浠?br />TAO鏄竴縐嶅紑婧愮殑CORBA鐨勫疄鐜般傚畠鏄熀浜庡璞$鐞嗙粍緇?OMG)鏍囧噯CORBA鍙傝冩ā鍨?騫墮氳繃鑷傚簲閫氳鐜(ACE)鎻愪緵鐨勮蔣浠舵蹇靛拰妗嗘灦鏋勫緩鑰屾垚銆傝繖鏄竴欏逛腑闂翠歡鎶鏈紝榪欑鎶鏈嬌閫氱敤緗戠粶緙栫▼浠誨姟鑷姩鍖栵紝鍖呮嫭浠ヤ笅鏂歸潰錛?br />1.娉ㄥ唽錛屽畾浣嶅拰嬋媧伙紱<br />2.瀵硅薄璇鋒眰鐨勫璺垎鍙戯紱<br />3.鍒嗗撫鍙婇敊璇鐞嗭紱<br />4.鍙傛暟緙栫爜鍜岃В鐮侊紱鍜?br />5.鎿嶄綔鐨勫璺垎瑙?/p> <p><a title="" >ACE</a>/TAO鐨勫疄鐜拌璦鏄疌鍜孋++銆傜敤ACE/TAO鏋勫緩鏈嶅姟鍣ㄥ拰瀹㈡埛绔殑榪囩▼瓚呭嚭浜嗘湰鎸囧崡鐨勮寖鍥達紝浣嗘湁鍑犱釜姒傚康榪樻槸鍊煎緱閲嶆彁錛?br />1. 鎺ュ彛(Interface)瀹氫箟鍦∣MG聽鏍囧噯鐨?idl鏂囦歡涓傜敤TAO_IDL瀹炵敤紼嬪簭,TAO鍙互鑷姩閫氳繃.idl鏂囦歡鐢熸垚C++鐨勯潤鎬佸瓨鏍?stubs)鍜屾鏋?skeletions),浜岃呭垎鍒敤浜庢湇鍔″櫒绔拰瀹㈡埛绔?<br />2.紼嬪簭鍛樺疄鐜板湪鐢熸垚鐨処.cpp闈欐佸瓨鏍逛腑鐨勬帴鍙o紝鍐嶄嬌鐢ㄦ儻鐢ㄧ殑CORBA鎶鏈潵緙栧啓瀹㈡埛绔拰鏈嶅姟绔殑浠g爜鏉ヨ繘琛屽疄鐜般?br />3. <a title="" >ACE</a>/TAO鎻愪緵浜嗕竴涓猰ake瀹炵敤紼嬪簭錛岃繖涓疄鐢ㄧ▼搴忓彲浠ヨ法騫沖彴鐨勭鐞嗛」鐩殑鍒涘緩鍜岀紪璇戙傜▼搴忓憳緙栧啓鐨?mpc鏂囦歡錛屽畾涔変簡鎵鍒涘緩鐨勯」鐩墍闇鐨勬簮浠g爜錛孭erl璇█鑴氭湰鍒涘緩makefile鏂囦歡鎴朧isual Sutdio鐨勮В鍐蟲柟妗堛傚湪Linux涓婏紝鍙互鐢熸垚GC++欏圭洰錛屽懡浠ゆ槸 mwc.pl -type gcace銆傚湪Windows涓婏紝浜х敓Visual studio.net 2003瑙e喅鏂規鐨勫懡浠ゆ槸:mwc.pl -type VC71</p><img src ="http://www.shnenglu.com/ace/aggbug/15959.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/ace/" target="_blank">Stone Jiang</a> 2006-12-04 10:24 <a href="http://www.shnenglu.com/ace/archive/2006/12/04/15959.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>ACE灝忔妧宸э細鍦ˋCE_Acceptor妗嗘灦涓紝鑷畾涔夋湇鍔″鐞嗗櫒鐨勫垱寤?/title><link>http://www.shnenglu.com/ace/archive/2006/08/30/11849.html</link><dc:creator>Stone Jiang</dc:creator><author>Stone Jiang</author><pubDate>Wed, 30 Aug 2006 06:11:00 GMT</pubDate><guid>http://www.shnenglu.com/ace/archive/2006/08/30/11849.html</guid><wfw:comment>http://www.shnenglu.com/ace/comments/11849.html</wfw:comment><comments>http://www.shnenglu.com/ace/archive/2006/08/30/11849.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/ace/comments/commentRss/11849.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/ace/services/trackbacks/11849.html</trackback:ping><description><![CDATA[<p> <span id="9n997p9" class="Title">ACE灝忔妧宸э細鍦ˋCE_Acceptor妗嗘灦涓紝鑷畾涔夋湇鍔″鐞嗗櫒鐨勫垱寤?/span> </p> <p> <em><a title="Focus on ACE" href="http://www.shnenglu.com/ace" >Stone Jiang</a></em> </p> <p>ACE_Acceptor妗嗘灦浣垮鏂拌繛鎺ョ殑渚﹀惉鍙樺緱瀹規槗錛屼篃浣垮垱寤哄拰嬋媧繪柊榪炴帴鐨凙CE_Svc_Handler鐨勬淳鐢熺被鍙樺緱瀹規槗銆備箣鍓嶆垜浠凡緇忎簡瑙d簡ACE_Svc_Handle::open()鎸傚嬀鍑芥暟鍜屾湇鍔″鐞嗗櫒</p> <p>鍒濆鍖栨椂瀹冩墍鎵紨鐨勮鑹層傛湰鏂囨垜浠洖閫鍑犳錛屾潵浜嗚В鏈嶅姟澶勭悊鍣ㄦ槸濡備綍瀹炰緥鍖栫殑浠ュ強鎴戜滑濡備綍鑷畾涔夊畠鐨勮涓恒?/p> <p>鍐嶇湅鐪婣CE_Acceptor綾伙紝瀹冩槸涓涓ā鏉跨被錛岀涓涓ā鏉垮弬鏁癆CE_Accetpor鏄唬琛ㄤ笌鏈嶅姟寤虹珛榪炴帴鐨勫鐞嗗櫒銆傚綋鏂扮殑榪炴帴寤虹珛鏃訛紝ACE_Acceptor璋冪敤make_svc_handler()鎸傚嬀鍑芥暟鏉?/p> <p>瀹為檯鍒涘緩鐨勬柊寤烘湇鍔″鐞嗗櫒瀵硅薄銆侫CE_Acceptor::make_svc_handler()鐨勫疄鐜板涓?<br /></p> <div style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 95%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid"> <div> <span style="COLOR: #000000">template聽</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #0000ff">class</span> <span style="COLOR: #000000">聽SVC_HANDLE,ACE_PEER_ACCEPTOR_1</span> <span style="COLOR: #000000">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000"> <br />ACE_Acceptor</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #000000">SVC_HANDLE,聽ACE_PEER_ACCEPTOR_2</span> <span style="COLOR: #000000">></span> <span style="COLOR: #000000">::make_svc_handler(SVC_HANDLE</span> <span style="COLOR: #000000">*&</span> <span style="COLOR: #000000">聽sh)<br />{<br />聽聽ACE_TRACE聽(</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">ACE_Acceptor<SVC_HANDLER,聽ACE_PEER_ACCEPTOR_2>::make_svc_handler</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">);聽聽</span> <span style="COLOR: #0000ff">if</span> <span style="COLOR: #000000">聽(sh聽</span> <span style="COLOR: #000000">==</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">)<br />聽聽聽聽ACE_NEW_RETURN聽(sh,<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽SVC_HANDLER,<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #000000">-</span> <span style="COLOR: #000000">1</span> <span style="COLOR: #000000">);聽聽</span> <span style="COLOR: #008000">//</span> <span style="COLOR: #008000">聽Set聽the聽reactor聽of聽the聽newly聽created聽<SVC_HANDLER>聽to聽the聽same<br />聽聽</span> <span style="COLOR: #008000">//</span> <span style="COLOR: #008000">聽reactor聽that聽this聽<ACE_Acceptor>聽is聽using.</span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #000000">聽聽sh</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">reactor聽(</span> <span style="COLOR: #0000ff">this</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">reactor聽());<br />聽聽</span> <span style="COLOR: #0000ff">return</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">;<br /><br />}<br /></span> </div> </div> <p>聽</p> <p>榛樿鐨勫疄鐜板寘鎷簡涓ゆ鍩烘湰鎿嶄綔錛?br />1.聽 鑾峰緱涓涓柊鐨凷VC_HANLDER瀵硅薄錛?榪欓噷鏄嬌鐢ㄧ殑new榪愮畻絎﹀垎閰嶇殑銆?br />2.聽 璁劇疆鏂扮殑鏈嶅姟澶勭悊鍣ㄧ殑reactor鎸囬拡涓篈CE_Accetpor浣跨敤鐨剅eactor鐨勩?/p> <p>鐒惰岋紝濡傛灉搴旂敤紼嬪簭闇瑕侀氳繃鍏跺畠鏂瑰紡鑾峰緱SVC_HANDLER瀵硅薄錛岃屼笉鏄氳繃榛樿鐨勬瀯閫犲嚱鏁伴偅縐嶅姩鎬佸垎閰嶏紝榪欏張璇ユ庝箞鍔炲憿錛熶婦渚嬫潵璇達紝鎴戜滑鍙兘闇瑕侊細<br />聽. 浠庝竴涓鍒嗛厤鐨勬睜涓幏寰桽VC_HANDLER瀵硅薄錛?br />聽. 涓烘柊鍒涘緩鐨凷VC_HANDLER浼犲叆涓浜涢澶栫殑淇℃伅<br />聽. 浣跨敤鍗曚綋鐨凷VC_HANDLER</p> <p>涓婇潰榪欎簺鎯呭艦錛屾垜浠兘鍙互鑷畾涔塵ake_svc_handler()鎸傚嬀鍑芥暟鏉ュ疄鐜板繀瑕佺殑琛屼負銆備緥濡?鍋囧畾鎴戜滑鏂扮殑澶勭悊鍣ㄩ渶瑕佹嫢鏈変竴涓鐞嗘墍鏈夊鎵鏈夋帴鏀跺埌鐨勬秷鎭繘琛岄泦涓鐞嗙殑涓績澶勭悊</p> <p>鍣ㄣ傝繖涓腑蹇冨鐞嗗櫒鎴戜滑鐢ㄧ被Processor琛ㄧず銆傛垜浠渶瑕佹瘡涓湇鍔″鐞嗗櫒閮芥嫢鏈変竴涓寚鍚戜腑蹇冨鐞嗗櫒鐨勬寚閽堬紝鑰屼笉鏄嬌Processor鎴愪負涓涓叏灞璁塊棶鐨勬寚閽?浣跨敤鍏ㄥ眬鍙橀噺鐨勭縐嶅紛绔?/p> <p>鏈枃涓嶄綔璇﹁堪)銆傛垜浠殑瑙e喅鍔炴硶鏄? 浠嶢CE_Accetor媧劇敓涓涓柊綾伙紝榪欎釜鏂扮被鎷ユ湁Processor鐨勬寚閽堜綔鎴愬憳錛屽茍涓旓紝鍦ㄥ垱寤烘柊鍜屾湇鍔″鐞嗗櫒(Service)鐨勬椂鍊欙紝鎶婅繖涓?Processor鐨?/p> <p>鎸囬拡浣滃弬鏁頒紶榪涘幓銆?/p> <p>鏂扮殑acceptor綾誨彲浠ヨ繖鏍峰畾涔夛細<br /></p> <div style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 95%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid"> <div> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /> <span style="COLOR: #0000ff">class</span> <span style="COLOR: #000000">聽My_Acceptor聽:聽</span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000">聽ACE_Acceptor</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #000000">Service,聽ACE_SOCK_ACCEPTOR</span> <span style="COLOR: #000000">></span> <span style="COLOR: #000000"> <br /> <img id="_68_539_Open_Image" onclick="this.style.display='none'; document.getElementById('_68_539_Open_Text').style.display='none'; document.getElementById('_68_539_Closed_Image').style.display='inline'; document.getElementById('_68_539_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top" /> <img id="_68_539_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; document.getElementById('_68_539_Closed_Text').style.display='none'; document.getElementById('_68_539_Open_Image').style.display='inline'; document.getElementById('_68_539_Open_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" align="top" /> </span> <span id="_68_539_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">...</span> <span id="_68_539_Open_Text"> <span style="COLOR: #000000">{<br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000">:<br /><img id="_140_142_Open_Image" onclick="this.style.display='none'; document.getElementById('_140_142_Open_Text').style.display='none'; document.getElementById('_140_142_Closed_Image').style.display='inline'; document.getElementById('_140_142_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="_140_142_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; document.getElementById('_140_142_Closed_Text').style.display='none'; document.getElementById('_140_142_Open_Image').style.display='inline'; document.getElementById('_140_142_Open_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽My_Acceptor聽(Processor聽</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">processor)聽:聽processor_聽(processor)聽</span> <span id="_140_142_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">...</span> <span id="_140_142_Open_Text"> <span style="COLOR: #000000">{聽}</span> </span> <span style="COLOR: #000000">;<br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />聽聽<br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />聽聽</span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">聽make_svc_handler聽(Service聽</span> <span style="COLOR: #000000">*&</span> <span style="COLOR: #000000">sh)<br /><img id="_190_502_Open_Image" onclick="this.style.display='none'; document.getElementById('_190_502_Open_Text').style.display='none'; document.getElementById('_190_502_Closed_Image').style.display='inline'; document.getElementById('_190_502_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="_190_502_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; document.getElementById('_190_502_Closed_Text').style.display='none'; document.getElementById('_190_502_Open_Image').style.display='inline'; document.getElementById('_190_502_Open_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span> <span id="_190_502_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">...</span> <span id="_190_502_Open_Text"> <span style="COLOR: #000000">{<br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">if</span> <span style="COLOR: #000000">聽(sh聽</span> <span style="COLOR: #000000">==</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">)<br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽ACE_NEW_RETURN聽(sh,<br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽Service聽(</span> <span style="COLOR: #0000ff">this</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">processor_),<br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="COLOR: #000000">-</span> <span style="COLOR: #000000">1</span> <span style="COLOR: #000000">);聽聽聽聽聽聽</span> <span style="COLOR: #008000">//</span> <span style="COLOR: #008000">聽Set聽the聽reactor聽of聽the聽newly聽created聽<SVC_HANDLER>聽to聽the聽same<br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽</span> <span style="COLOR: #008000">//</span> <span style="COLOR: #008000">聽聽reactor聽that聽this聽<ACE_Acceptor>聽is聽using.</span> <span style="COLOR: #008000"> <br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /> </span> <span style="COLOR: #000000">聽聽聽聽聽聽sh</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">reactor聽(</span> <span style="COLOR: #0000ff">this</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">reactor聽());<br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">return</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">;<br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span> </span> <span style="COLOR: #000000"> <br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /> <br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /> </span> <span style="COLOR: #0000ff">private</span> <span style="COLOR: #000000">:<br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />聽聽Processor聽</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">processor_;<br /><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> <span style="COLOR: #000000"> <br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /> </span> </div> </div> <p>聽</p> <p>灝辮繖鏍鳳紝鐜板湪錛屽綋My_Acceptor鎺ュ彈鏂拌繛鎺ョ殑鏃跺欙紝make_svc_handler()鎸傚嬀鍑芥暟鍒嗛厤涓涓柊鐨勫鐞嗗櫒(Service)錛屽茍鎶奝rocessor*浣滀負鍙傛暟浼犺繘鍘匯傞渶瑕佹敞鎰忕殑浜嬶紝灝界榪欓噷浣跨敤</p> <p>鐨勬槸榪欎竴涓瀯閫犲嚱鏁癝ervice(Processor*)銆傛垜浠粛闇姹備負Service綾誨畾涔夐粯璁ょ殑鏋勯犲嚱鏁幫紝浠ユ弧瓚蟲ā鏉跨被ACE_Acceptor鐨勯渶瑕併?/p> <p>聽</p><img src ="http://www.shnenglu.com/ace/aggbug/11849.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/ace/" target="_blank">Stone Jiang</a> 2006-08-30 14:11 <a href="http://www.shnenglu.com/ace/archive/2006/08/30/11849.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>灝忔妧宸? 褰揂CE_Svc_Handler鍏抽棴鏃朵嬌鐢ㄧ殑榛樿琛屼負http://www.shnenglu.com/ace/archive/2006/08/28/11762.htmlStone JiangStone JiangMon, 28 Aug 2006 01:36:00 GMThttp://www.shnenglu.com/ace/archive/2006/08/28/11762.htmlhttp://www.shnenglu.com/ace/comments/11762.htmlhttp://www.shnenglu.com/ace/archive/2006/08/28/11762.html#Feedback0http://www.shnenglu.com/ace/comments/commentRss/11762.htmlhttp://www.shnenglu.com/ace/services/trackbacks/11762.html灝忔妧宸? 褰揂CE_Svc_Handler鍏抽棴鏃朵嬌鐢ㄧ殑榛樿琛屼負

Stone Jiang

涓婁竴綃囨垜浠湅浜咥CE_Svc_Handler::open()鎸傚嬀鍑芥暟鎻愪緵榛樿琛屼負鐨勪竴浜涙妧宸с傚洜涓哄湪澶у鏁版儏鍐典笅錛屽畠瀹屾垚浜嗘湇鍔″垱寤烘椂鎵闇鐨勬墍鏈変簨鎯咃細涓鴻緭鍏ヤ簨浠舵敞鍐屾柊澶勭悊鍣ㄥ拰榪斿洖銆?/p>


鍦ˋCE_Svc_Handler涓叧闂搷浣滅殑榛樿琛屼負瑕佹瘮鍦╫pen()涓垵濮嬪寲鐨勪唬鐮佹洿涓哄鏉傘傝繖鏄洜涓哄叧闂椂鐨勬寕鍕懼嚱鏁板寘鍚簡鍙嶅簲寮?reactive)鍏抽棴鍜屼富鍔ㄥ紡(active-object)鍏抽棴涓ょ鎯?/p>

鍐碉紝瀹冧滑鏈夌浉鍚岀殑鏁堟灉:鍒犻櫎鎵鏈夊湪鍙嶅簲鍣ㄦ敞鍐岀殑浜嬩歡鍜岀‘淇濆垹闄CE_Svc_handler鐨勬淳鐢熺被鐨勫璞°?/p>

鍙嶅簲寮忓叧闂?handle_close()): 褰撲互涓嬪艦鍐靛彂鐢熸椂琚皟鐢細
聽1) 浜嬩歡鍥炶皟鍑芥暟(璇戞敞錛歨andle_xxxx())榪斿洖-1鏃訛紝鎴?br />聽2) 璋冪敤ACE_Reactor::remove_handler()錛屼紶鍏ョ殑鏍囪涓嶅惈 DONT_CALL鏃?br />聽鍙嶅簲鍣ㄦ鏋跺皢璋冪敤handle_close()鎸傚嬀鍑芥暟銆?ACE_Svc_handler::handle_close()鐨勯粯璁よ涓烘槸璋冪敤ACE_Svc_Handler::destroy()閿姣佷簨浠跺鐞嗗櫒銆?/p>


涓誨姩瀵硅薄寮忓叧闂?close()): 褰揂CE_Svc_Handler 媧劇敓鐨勫璞¢氳繃activate()鍑芥暟杞彉涓轟富鍔ㄥ璞★紝澶勭悊鍣ㄧ殑鐨剆vc()鏂規硶鍦ㄥ畠浜х敓鐨勭嚎紼嬩腑榪愯鍚庤繘琛屽洖璋冦傚綋svc()榪斿洖鏃訛紝綰跨▼

閫鍑猴紝浣嗗湪瀹冭閫鍑烘椂錛屼粛鍦ㄥ皢瑕侀鍑虹嚎紼嬬殑涓婁笅鏂囦腑錛孉CE_Task妗嗘灦璋冪敤瀹冪殑close()鏂規硶銆侫CE_Svc_Handler::close()鏂規硶璋冪敤handle_close()瀹屾垚鏈嶅姟澶勭悊鍣ㄧ殑娓呯悊宸ヤ綔銆?/p>

鍥犳錛屼笉綆CE_Svc_Handler瀵硅薄鏄弽搴斿紡榪樻槸涓誨姩寮忥紝緇撴潫鏃剁殑娓呯悊宸ヤ綔閮藉湪鐩稿悓鐨勫湴鏂癸細ACE_Svc_Handler::destroy()銆傚鏋滃璞℃槸鍔ㄦ佸垎閰嶄笖涓嶆槸ACE_Stream妗嗘灦涓殑緇勬垚閮?/p>

鍒嗭紝destroy()灝嗗垹闄ゆ瀵硅薄錛屽鏋滃璞′笉鏄姩鎬佸垎閰嶇殑錛屾瀽鏋勫畠鐨勮矗浠繪槸鍒涘緩鏃跺璞℃墍鍦ㄧ殑灝侀棴鑼冨洿銆傚鏋滃璞℃槸ACE_Stream鐨勬ā鍧楃殑緇勬垚閮ㄥ垎錛屾祦鍜?鎴栨帶鍒舵祦鐨勪唬鐮佽礋璐g鐞?/p>

瀵硅薄鐨勭敓鍛芥湡銆俤estroy()鍑芥暟搴旈伒瀹堣繖鏍風殑瑙勫垯鏉ラ伩鍏嶅嚭鐜拌祫婧愭硠婕忋?/p>


鏃犺ACE_Svc_Handler瀵硅薄鏄弽搴斿紡閿姣佽繕鏄富鍔ㄥ紡閿姣侊紝閮戒細寮曡搗鐩稿悓鐨勪簨鎯呭彂鐢燂細~ACE_Svc_Handler() (澶勭悊鍣ㄧ殑鏋愭瀯鍑芥暟)璋冪敤ACE_Svc_Handler::shutdown()鍑芥暟瀹屾垚鏈嶅姟澶?/p>

鐞嗗櫒鐨勬竻鐞嗗伐浣溿俿hutdown()鎵ц鐨勮繖浜涙竻鐞嗘搷浣滄槸錛?/p>

濡傛灉澶勭悊鍣ㄤ笌鍙嶅簲鍣ㄦ槸鍏寵仈鐨勶細
聽聽 鍙栨秷澶勭悊鍣ㄥ叧鑱旂殑鎵鏈夊畾鏃跺櫒銆?br />聽聽 涓哄鐞嗗櫒鐨勬祦瀵硅薄錛堝socket)鍒犻櫎鎵鏈夊凡娉ㄥ唽鐨勪簨浠躲?br />濡傛灉澶勭悊鍣ㄤ笌鍐嶇敓鍣?recycler)鏄叧緋葷殑錛屼粠鍐嶇敓鍣ㄤ腑娓呴櫎澶勭悊鍣ㄣ?br />鍏抽棴嫻佸璞°?br />鍥犳錛屾垜浠湅鍒扮殑緇濆ぇ澶氭暟鎯呭喌鏈嶅姟澶勭悊鍣ㄩ氳繃shutdown闇瑕侀氳繃妗嗘灦鏉ユ竻鐞嗗伐浣滐紝閮芥槸綆鍗曠殑鍏佽緙虹渷鐨勬寕鍕懼嚱鏁板緱浠ヨ璋冪敤銆傚鏋滀綘鐨勫簲鐢ㄧ▼搴忛渶姹傛洿澶氱殑鍏抽棴/娓呯悊瑙勫垯錛屾帹

鑽愮殑鍦版柟鏄綘鐨勫鐞嗗櫒鐨刪andle_close()鎸傚嬀鏂規硶銆備粎浠呮槸紜繚鎶夾CE_Svc_Handler::destroy()鍑芥暟浜轟綔涓轟綘鐨刪andle_close()鐨勬渶鍚庝竴涓姩浣滐紝涓庢鏋舵竻鐞嗚涓虹殑浣欎笅鐨勮涓哄悎

騫躲?/p>




Stone Jiang 2006-08-28 09:36 鍙戣〃璇勮
]]>
灝忔妧宸? ACE_Svc_Handler鐨勫垵濮嬪寲http://www.shnenglu.com/ace/archive/2006/08/27/11758.htmlStone JiangStone JiangSun, 27 Aug 2006 15:48:00 GMThttp://www.shnenglu.com/ace/archive/2006/08/27/11758.htmlhttp://www.shnenglu.com/ace/comments/11758.htmlhttp://www.shnenglu.com/ace/archive/2006/08/27/11758.html#Feedback0http://www.shnenglu.com/ace/comments/commentRss/11758.htmlhttp://www.shnenglu.com/ace/services/trackbacks/11758.html灝忔妧宸? ACE_Svc_Handler鐨勫垵濮嬪寲
				
						

Stone Jiang
ACE_Svc_Handler緇忓父鐢ㄤ簬緗戠粶鏈嶅姟綾葷殑鍩虹被錛岃繖鏄洜涓哄畠寰堝鏄撳湪涓誨姩瀵硅薄(Active Ojbect)
妯″紡鍜屽弽搴斿櫒(Reactor)妗嗘灦涓嬌鐢ㄣ侫PG絎?.6鑺備腑璁ㄨ浜嗘庝箞鍦ㄦ帴鍙楀櫒-榪炴帴鍣?Acceptor-conector)
妗嗘灦涓浣曟妸ACE_Svc_Handler浣滀負鐩爣鏉ヤ嬌鐢紝騫朵笖錛屽湪C++NPv2絎?绔犱腑錛屾繁搴︽帰璁ㄤ簡
Acceotor-Connector鐨勭浉鍏寵璁°?/pre>
鎸傚嬀鍑芥暟(Hook method)ACE_Svc_Handler::open()甯告槸鏈嶅姟涓柊寤鴻繛鎺ユ椂鎵ц鐨勫垵濮嬪寲璁劇疆鐨勫湴鏂廣?br />涓句緥鏉ヨ錛屽鏋滄湇鍔¤鍦ㄦ棩蹇椾腑璁板綍鏂拌繛鎺ュ緩绔嬬殑鐩稿叧淇℃伅錛宱pen()鍑芥暟鏄垯鏄褰曡繖涓俊鎭殑鍦版柟銆?br />瀵逛簬浣跨敤Reacotor 妗嗘灦鐨勬湇鍔℃鏌ョ綉緇滄暟鎹埌杈撅紝open()鏄墽琛宺eactor娉ㄥ唽鐨勫湴鏂廣?br />浜嬪疄涓婏紝榪欐鏄痳eactor娉ㄥ唽鐨勫湴鏂癸紝榪欑鍔ㄤ綔鍦ㄦ湇鍔″緩绔嬫柊榪炴帴鏃墮潪甯稿父瑙佺殑錛孉CE_Svc_Handler::
open()鐨勭己鐪佹搷浣滀篃姝f槸
if (this->reactor () && this->reactor ()->register_handler
          (this,
           ACE_Event_Handler::READ_MASK) == -1)
  ACE_ERROR_RETURN ((LM_ERROR,
                     ACE_LIB_TEXT ("%p\n"),
                     ACE_LIB_TEXT ("unable to register client handler")),
                    -1);
return 0;
鎵浠ワ紝濡傛灉鍦ㄤ笌鏈嶅姟寤虹珛鏂拌繛鎺ュ茍涓衡滆浜嬩歡鈥濇敞鍐屾椂錛屼綘鐢氳嚦涓嶉渶瑕佸湪浣犵殑綾諱腑
瀹炵幇open(void*)鍑芥暟錛孉CE宸茬粡涓轟綘鍋氫簡榪欎竴姝?鍙﹀錛岃璁頒綇錛屽鏋渞eactor娉ㄥ唽澶辮觸錛?br />榛樿鐨刼pen()鍑芥暟浼氳繑鍥?1錛屽畠浼氬紩璧稟cceptor-Connector妗嗘灦鍏抽棴鏂板緩鐨勮繛鎺ュ拰鍒犻櫎榪欎釜
浜嬩歡澶勭悊鍣?handler)銆?br />Stone Jiang
http://www.shnenglu.com/ace/



]]>鏈変漢鐭ラ亾CSDN閭歡鍒楄〃鐨勯璁㈡柟寮忓悧?http://www.shnenglu.com/ace/archive/2006/08/08/10975.htmlStone JiangStone JiangTue, 08 Aug 2006 04:27:00 GMThttp://www.shnenglu.com/ace/archive/2006/08/08/10975.htmlhttp://www.shnenglu.com/ace/comments/10975.htmlhttp://www.shnenglu.com/ace/archive/2006/08/08/10975.html#Feedback1http://www.shnenglu.com/ace/comments/commentRss/10975.htmlhttp://www.shnenglu.com/ace/services/trackbacks/10975.html鍑犱箮姣忓ぉ鏀跺埌涓灝佸埌鍑犲皝涓嶆兂鐪嬬殑鍨冨溇閭歡,閭歡涓嵈娌℃湁閫璁㈠姛鑳?
騫朵笖,鏍規湰灝辨病鏈夎榪囪繖綾婚偖浠?
涓嶇煡閬撴湁娌℃湁浜轟篃鏈夊悓鏍風殑鐑︽伡?



]]>
狠狠狠色丁香婷婷综合久久五月| 久久久精品久久久久久| 亚洲精品无码久久不卡| 久久精品国产72国产精福利| 久久有码中文字幕| 国内精品九九久久精品| 久久中文娱乐网| 伊人久久精品无码二区麻豆| 狠狠色噜噜狠狠狠狠狠色综合久久| 国产成人精品久久一区二区三区av| 精品久久久一二三区| 国产精品久久一区二区三区 | 狠狠色丁香久久综合婷婷| 狠狠色综合久久久久尤物| 中文字幕乱码久久午夜| AA级片免费看视频久久| 久久亚洲AV成人无码| 国产精久久一区二区三区| 久久99久久99精品免视看动漫| 久久久久亚洲精品男人的天堂| 久久亚洲精品成人av无码网站| 欧美亚洲国产精品久久久久| 青青久久精品国产免费看 | 91精品国产色综合久久| 伊人久久无码精品中文字幕| 日本精品久久久久中文字幕 | 久久狠狠色狠狠色综合| 欧美亚洲色综久久精品国产| 国产精品久久久久免费a∨| 久久久久亚洲AV综合波多野结衣| 久久国产精品一区二区| 久久精品aⅴ无码中文字字幕不卡| 中文字幕久久久久人妻| 伊人久久一区二区三区无码| 狠狠精品干练久久久无码中文字幕| 国产一区二区三区久久精品| 精品国产乱码久久久久久郑州公司| 色综合久久无码中文字幕| 久久婷婷五月综合97色一本一本| 久久中文字幕人妻丝袜| 色偷偷88888欧美精品久久久|