• <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)用場(chǎng)景:
                    做了一個(gè)client,去和Message Middleware通信,實(shí)時(shí)獲取消息中間件以topic方式(不是Queue,對(duì)Message Middleware來(lái)說(shuō),Queue是發(fā)送一個(gè)destination,topic可以發(fā)多個(gè))。

                    從實(shí)時(shí)獲取的角度來(lái)說(shuō),需要啟一個(gè)線程,接收Message Middleware消息,然后做場(chǎng)景需要的處理。創(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 閱讀(510) 評(píng)論(0)  編輯 收藏 引用 所屬分類(lèi): OS
            <2009年6月>
            31123456
            78910111213
            14151617181920
            21222324252627
            2829301234
            567891011

            常用鏈接

            留言簿(10)

            隨筆分類(lèi)(307)

            隨筆檔案(297)

            algorithm

            Books_Free_Online

            C++

            database

            Linux

            Linux shell

            linux socket

            misce

            • cloudward
            • 感覺(jué)這個(gè)博客還是不錯(cuò),雖然做的東西和我不大相關(guān),覺(jué)得看看還是有好處的

            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)論排行榜

            久久毛片免费看一区二区三区| 久久精品这里只有精99品| 99久久夜色精品国产网站| 久久久久高潮毛片免费全部播放 | 国产午夜精品久久久久免费视 | 久久久国产视频| 国产精品美女久久久久| 久久国产成人| 久久精品亚洲精品国产色婷| 精品久久人人妻人人做精品| 久久综合狠狠综合久久| 久久久久99精品成人片牛牛影视| 婷婷伊人久久大香线蕉AV| 久久久久人妻一区精品| 久久99精品综合国产首页| 精品多毛少妇人妻AV免费久久| 久久夜色tv网站| 日韩AV无码久久一区二区| 中文字幕精品无码久久久久久3D日动漫| 亚洲香蕉网久久综合影视| 久久久久亚洲精品无码网址| 狠狠色丁香婷综合久久| 久久香蕉国产线看观看精品yw| 99精品国产免费久久久久久下载| 91久久香蕉国产熟女线看| 99久久婷婷国产综合亚洲| 日产精品久久久一区二区| 伊人久久精品无码av一区| 久久久久久久久久久久久久| 久久精品国产免费观看| 久久人人爽人人爽人人av东京热 | 久久99中文字幕久久| 国内精品伊人久久久久AV影院| 国产成人精品三上悠亚久久| 亚洲国产日韩欧美综合久久| 免费精品久久久久久中文字幕 | 亚洲精品国产成人99久久| 久久最近最新中文字幕大全| 韩国三级中文字幕hd久久精品 | 国产欧美一区二区久久| 久久不射电影网|