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

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            国产成人无码精品久久久久免费| 久久精品国产亚洲AV香蕉| 91久久精品国产91性色也| 国产综合免费精品久久久| 亚洲精品国产第一综合99久久| 久久99久国产麻精品66| 精品久久久噜噜噜久久久| 久久99久久无码毛片一区二区| 国产精品久久久久久久久软件| 大伊人青草狠狠久久| 久久久久人妻一区精品果冻| 久久精品国产亚洲AV不卡| a高清免费毛片久久| 中文字幕日本人妻久久久免费 | 99国产精品久久| 精品熟女少妇aⅴ免费久久| 国色天香久久久久久久小说| 91精品观看91久久久久久| 无码AV中文字幕久久专区| 久久香蕉国产线看观看猫咪?v| 久久久亚洲欧洲日产国码aⅴ| 久久国产免费| 国产精品激情综合久久| 麻豆精品久久久一区二区| 一本一本久久A久久综合精品 | AV无码久久久久不卡网站下载| 亚洲精品国产综合久久一线| 99久久免费国产精精品| 亚洲va中文字幕无码久久| 久久久久18| 性做久久久久久免费观看| 精品久久久久久久久久中文字幕| 四虎国产精品免费久久久| 狠狠色噜噜狠狠狠狠狠色综合久久| 狠狠色婷婷久久一区二区 | 一本久久综合亚洲鲁鲁五月天亚洲欧美一区二区 | 91亚洲国产成人久久精品| 2021少妇久久久久久久久久| 日韩精品久久无码人妻中文字幕 | 人妻无码αv中文字幕久久琪琪布| 亚洲精品NV久久久久久久久久|