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

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            一本久久精品一区二区| 熟妇人妻久久中文字幕| 香蕉aa三级久久毛片| 久久久久亚洲Av无码专| 国产三级精品久久| 久久精品人人做人人妻人人玩 | 精品久久8x国产免费观看| 国产成人久久777777| 精品国产乱码久久久久久人妻| 久久r热这里有精品视频| 亚洲人成无码www久久久| 91久久精品视频| 99久久人妻无码精品系列| 久久久国产打桩机| 亚洲精品乱码久久久久久不卡| 精品久久久久久成人AV| 人妻精品久久无码区| 一级做a爰片久久毛片免费陪 | 99精品伊人久久久大香线蕉| 国产美女亚洲精品久久久综合| 天天综合久久一二三区| 热re99久久精品国产99热| 97久久国产亚洲精品超碰热| 色妞色综合久久夜夜| 少妇久久久久久被弄高潮| 亚洲国产精品无码久久青草| 久久精品国产精品亚洲艾草网美妙| 久久久久AV综合网成人| 久久久久人妻一区精品色| 亚洲精品乱码久久久久久中文字幕| 久久人妻AV中文字幕| 久久精品中文字幕一区| av色综合久久天堂av色综合在| 久久久久亚洲AV无码观看| 国产成人精品综合久久久久| 久久精品国产久精国产一老狼| 麻豆av久久av盛宴av| 久久精品国产久精国产一老狼| 亚洲精品无码专区久久久| 久久精品亚洲日本波多野结衣| 久久久久人妻一区精品色|