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

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

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

            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

            搜索

            •  

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            婷婷五月深深久久精品| 久久精品中文无码资源站| 精品无码久久久久久国产| 久久天天躁狠狠躁夜夜不卡 | 热RE99久久精品国产66热| 99久久国产亚洲综合精品| 国产亚洲婷婷香蕉久久精品| 久久亚洲AV永久无码精品| 日产精品99久久久久久| 久久久久99精品成人片牛牛影视| 性做久久久久久久| 综合久久精品色| 久久99精品久久久久久野外| 少妇精品久久久一区二区三区| 狠狠色丁香婷婷综合久久来来去| 久久99精品久久久久子伦| 久久久www免费人成精品| 久久精品国产72国产精福利| 国产精品久久99| 无码AV中文字幕久久专区| 欧美日韩精品久久久久| 国产精品成人无码久久久久久| 久久久久久毛片免费播放| 精品久久久无码人妻中文字幕| 欧美精品丝袜久久久中文字幕 | 久久久久亚洲精品日久生情| 久久996热精品xxxx| 91精品国产91久久久久久蜜臀| 久久久久亚洲精品天堂| 色欲久久久天天天综合网精品| 久久人妻少妇嫩草AV蜜桃| 久久久久久久综合狠狠综合| 午夜精品久久久久久影视777| 久久婷婷五月综合97色直播| 精品久久久久国产免费| 久久精品成人| 久久综合五月丁香久久激情| 伊人久久五月天| 亚洲午夜久久久久久噜噜噜| 欧洲精品久久久av无码电影| 久久久国产精品亚洲一区|