• <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)用場(chǎng)景:
                    做了一個(gè)client,去和Message Middleware通信,實(shí)時(shí)獲取消息中間件以topic方式(不是Queue,對(duì)Message Middleware來(lái)說(shuō),Queue是發(fā)送一個(gè)destination,topic可以發(fā)多個(gè))。

                    從實(shí)時(shí)獲取的角度來(lái)說(shuō),需要啟一個(gè)線程,接收Message Middleware消息,然后做場(chǎng)景需要的處理。創(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 閱讀(510) 評(píng)論(0)  編輯 收藏 引用 所屬分類(lèi): OS
            <2009年6月>
            31123456
            78910111213
            14151617181920
            21222324252627
            2829301234
            567891011

            常用鏈接

            留言簿(10)

            隨筆分類(lèi)(307)

            隨筆檔案(297)

            algorithm

            Books_Free_Online

            C++

            database

            Linux

            Linux shell

            linux socket

            misce

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

            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)論排行榜

            久久久久久亚洲Av无码精品专口| 久久天堂电影网| 久久久久亚洲av成人网人人软件| 亚洲色大成网站WWW久久九九| 久久夜色精品国产欧美乱| 曰曰摸天天摸人人看久久久| 一本色道久久综合| www性久久久com| 久久综合色老色| 久久亚洲国产精品一区二区| 久久久国产视频| 久久久久亚洲AV无码去区首| 狠狠色婷婷久久一区二区 | 精品久久久久成人码免费动漫| 99久久精品免费看国产一区二区三区 | 国产精品青草久久久久婷婷 | 亚洲va久久久久| 91久久精品国产免费直播| 午夜欧美精品久久久久久久| 久久e热在这里只有国产中文精品99| 中文国产成人精品久久不卡| 欧美性猛交xxxx免费看久久久| 美女写真久久影院| 97久久超碰成人精品网站| 亚洲狠狠婷婷综合久久久久| 久久免费视频1| 久久人人爽人人爽人人片AV东京热| 国产精品久久成人影院| 国产情侣久久久久aⅴ免费| 精品久久久久久中文字幕大豆网| 久久精品国产99国产精偷| 久久不见久久见免费视频7| 久久精品国产久精国产果冻传媒 | 99久久国产综合精品五月天喷水| 色综合久久无码五十路人妻| 国产成人无码精品久久久性色| 无码乱码观看精品久久| 亚洲欧美日韩精品久久亚洲区 | 亚洲国产成人久久一区久久| 人妻中文久久久久| 狠狠色丁香久久婷婷综合蜜芽五月 |