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

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            久久毛片一区二区| 久久精品国产亚洲av麻豆图片| 亚洲午夜无码久久久久| 欧美日韩精品久久免费| 欧美一区二区三区久久综合| 国产精品一区二区久久不卡| 久久久精品久久久久久| 日韩欧美亚洲综合久久| 免费观看久久精彩视频| 亚洲国产婷婷香蕉久久久久久| 欧美亚洲色综久久精品国产| 久久天堂电影网| 少妇熟女久久综合网色欲| 久久精品中文字幕久久| 2020国产成人久久精品| 9999国产精品欧美久久久久久| 一级女性全黄久久生活片免费 | 91精品国产91热久久久久福利| 亚洲精品无码久久毛片| 久久国产亚洲精品麻豆| 久久婷婷国产剧情内射白浆| 国产成人精品久久综合| 久久国产精品99精品国产| 久久午夜夜伦鲁鲁片免费无码影视| 久久久久免费精品国产| 亚洲AV成人无码久久精品老人| 久久亚洲精品无码观看不卡| 亚洲精品高清久久| 99re这里只有精品热久久| 亚洲女久久久噜噜噜熟女| 无码人妻少妇久久中文字幕| 国产精品免费久久久久影院| 91精品国产9l久久久久| 久久国产精品无码一区二区三区 | 久久亚洲欧洲国产综合| 精品久久久久久无码人妻蜜桃| 婷婷久久综合九色综合98| 国内精品久久久久影院日本| 欧美大香线蕉线伊人久久| 18岁日韩内射颜射午夜久久成人| 亚洲精品乱码久久久久久不卡|