• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            posts - 297,  comments - 15,  trackbacks - 0

            應(yīng)用場景:
                    做了一個(gè)client,去和Message Middleware通信,實(shí)時(shí)獲取消息中間件以topic方式(不是Queue,對(duì)Message Middleware來說,Queue是發(fā)送一個(gè)destination,topic可以發(fā)多個(gè))。

                    從實(shí)時(shí)獲取的角度來說,需要啟一個(gè)線程,接收Message Middleware消息,然后做場景需要的處理。創(chuàng)建線程的函數(shù)如下所示:
             // for compilers which have it, we should use C RTL function for thread
            // creation instead of Win32 API one because otherwise we will have memory
            // leaks if the thread uses C RTL (and most threads do)
            #if defined(__VISUALC__) || \
                (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) || \
                (defined(__GNUG__) && defined(__MSVCRT__))
                typedef unsigned (__stdcall *RtlThreadStart)(void *);

                m_hThread = (HANDLE)_beginthreadex(NULL, 0,
                                                   (RtlThreadStart)
                                                   wxThreadInternal::WinThreadStart,
                                                   thread, CREATE_SUSPENDED,
                                                   (unsigned int *)&m_tid);
            #else // compiler doesn't have _beginthreadex
                m_hThread = ::CreateThread
                              (
                                NULL,                               // default security
                                0,                                  // default stack size
                                (LPTHREAD_START_ROUTINE)            // thread entry point
                                wxThreadInternal::WinThreadStart,   // the function that runs under thread
                                (LPVOID)thread,                     // parameter
                                CREATE_SUSPENDED,                   // flags
                                &m_tid                              // [out] thread id
                              );
            #endif // _beginthreadex/CreateThread
            note: there should be a function definition before these lines.eg:
             DWORD wxThreadInternal::WinThreadStart(wxThread *thread)

            posted on 2008-09-26 09:07 chatler 閱讀(513) 評(píng)論(0)  編輯 收藏 引用 所屬分類: OS
            <2008年9月>
            31123456
            78910111213
            14151617181920
            21222324252627
            2829301234
            567891011

            常用鏈接

            留言簿(10)

            隨筆分類(307)

            隨筆檔案(297)

            algorithm

            Books_Free_Online

            C++

            database

            Linux

            Linux shell

            linux socket

            misce

            • cloudward
            • 感覺這個(gè)博客還是不錯(cuò),雖然做的東西和我不大相關(guān),覺得看看還是有好處的

            network

            OSS

            • Google Android
            • Android is a software stack for mobile devices that includes an operating system, middleware and key applications. This early look at the Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language.
            • os161 file list

            overall

            搜索

            •  

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            精品久久久无码21p发布| 久久久精品国产免大香伊 | 久久无码人妻精品一区二区三区| 久久九九久精品国产免费直播| 777午夜精品久久av蜜臀| 久久99精品国产| 欧洲精品久久久av无码电影| 婷婷久久综合| 久久综合久久鬼色| 91久久精品国产91性色也| 狠狠色丁香婷综合久久| 久久永久免费人妻精品下载| 青草久久久国产线免观| 久久久久亚洲精品无码网址| 1000部精品久久久久久久久| 奇米影视7777久久精品| 超级碰碰碰碰97久久久久| 久久99热这里只有精品国产| 91久久九九无码成人网站| 亚洲中文久久精品无码| 奇米影视7777久久精品| 久久96国产精品久久久| 香蕉久久一区二区不卡无毒影院| 久久精品一区二区国产| 99久久国产综合精品网成人影院 | 青春久久| 国产婷婷成人久久Av免费高清| 久久久久国产精品| 久久婷婷是五月综合色狠狠| 久久91精品国产91久| 国产精品美女久久久m| 九九久久精品无码专区| 热re99久久6国产精品免费| 国产精品一区二区久久精品无码 | 亚洲国产精品高清久久久| 久久久国产精品福利免费| 亚洲中文字幕无码久久2017| 日日狠狠久久偷偷色综合免费| 国产V综合V亚洲欧美久久| 久久国产亚洲精品| 久久久久久国产精品无码下载|