• <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是發送一個destination,topic可以發多個)。

                    從實時獲取的角度來說,需要啟一個線程,接收Message Middleware消息,然后做場景需要的處理。創建線程的函數如下所示:
             // 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 閱讀(511) 評論(0)  編輯 收藏 引用 所屬分類: OS
            <2009年3月>
            22232425262728
            1234567
            891011121314
            15161718192021
            22232425262728
            2930311234

            常用鏈接

            留言簿(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

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            色欲久久久天天天综合网精品| 久久这里只精品国产99热| 久久中文字幕视频、最近更新| 狠狠人妻久久久久久综合蜜桃| 综合久久久久久中文字幕亚洲国产国产综合一区首 | 久久久无码精品亚洲日韩按摩 | 国产精品欧美久久久久无广告| 免费一级欧美大片久久网| 久久人人爽人人爽人人AV东京热| 伊人热人久久中文字幕| 狠狠色噜噜色狠狠狠综合久久| 久久亚洲AV成人出白浆无码国产| 久久夜色tv网站| 久久亚洲精品成人av无码网站| 久久综合给合综合久久| 久久亚洲中文字幕精品有坂深雪 | 色综合久久综合网观看| 国产精品久久久久免费a∨| 热99re久久国超精品首页| 77777亚洲午夜久久多人| 久久亚洲天堂| 久久久久黑人强伦姧人妻| 国产一区二区三区久久| 欧美一区二区三区久久综合 | 久久综合给久久狠狠97色| 2020国产成人久久精品| 久久久久久久久久免免费精品| 久久精品成人免费网站| 久久亚洲国产午夜精品理论片| 久久夜色精品国产噜噜噜亚洲AV| 久久天天躁狠狠躁夜夜2020一| 亚洲日本va午夜中文字幕久久| 久久精品亚洲福利| 精品久久久久久国产牛牛app| 久久精品国内一区二区三区| 国产美女久久久| 青青青青久久精品国产| 99久久精品免费看国产一区二区三区 | 国内精品久久久久伊人av| 无码专区久久综合久中文字幕 | 亚洲精品无码久久久久|