• <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

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

                    從實時獲取的角度來說,需要啟一個線程,接收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) 評論(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
            • 感覺這個博客還是不錯,雖然做的東西和我不大相關,覺得看看還是有好處的

            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

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            精品一久久香蕉国产线看播放| 久久婷婷五月综合色高清| 94久久国产乱子伦精品免费| 国产精品熟女福利久久AV| 日本精品久久久久久久久免费| 伊人久久无码精品中文字幕| 久久国产精品无码HDAV | 国产免费久久精品丫丫| 91麻豆国产精品91久久久| 久久发布国产伦子伦精品| 伊人久久大香线蕉精品不卡| 热re99久久精品国产99热| 日韩乱码人妻无码中文字幕久久| 国产精品亚洲综合专区片高清久久久| 亚洲Av无码国产情品久久| 国产免费久久久久久无码| 国产精品久久久久久久久免费| 亚洲欧美成人久久综合中文网| 欧美精品一本久久男人的天堂| 久久精品卫校国产小美女| 精品久久久久久国产三级| 久久久精品免费国产四虎| 偷偷做久久久久网站| 国产午夜精品久久久久九九电影| 色偷偷久久一区二区三区| 久久无码人妻精品一区二区三区| 国产精品美女久久久| 久久国产精品成人片免费| 久久国产色AV免费观看| 久久久久国产精品熟女影院| 精品人妻伦九区久久AAA片69| 九九精品久久久久久噜噜| 午夜视频久久久久一区| 久久有码中文字幕| 中文国产成人精品久久亚洲精品AⅤ无码精品 | 国产aⅴ激情无码久久| 亚洲va久久久久| 久久久一本精品99久久精品88| 久久久这里有精品| 久久国产免费直播| 久久精品亚洲日本波多野结衣|