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

            99久久免费只有精品国产| 亚洲狠狠婷婷综合久久蜜芽| 亚洲国产成人久久精品影视 | 久久精品国产第一区二区三区| 日韩乱码人妻无码中文字幕久久| 国产一级持黄大片99久久| 久久婷婷五月综合色99啪ak| 乱亲女H秽乱长久久久| 久久久久人妻精品一区三寸蜜桃| 熟妇人妻久久中文字幕| 久久精品?ⅴ无码中文字幕| 久久久无码精品亚洲日韩蜜臀浪潮 | 日产精品久久久久久久| 久久国产精品久久国产精品| 色妞色综合久久夜夜| 国产精品美女久久久久av爽 | 国产成人精品久久综合| 久久久久亚洲av无码专区| 久久精品国产色蜜蜜麻豆| 久久综合九色欧美综合狠狠 | 久久久婷婷五月亚洲97号色| 亚洲&#228;v永久无码精品天堂久久| 久久国产热精品波多野结衣AV| 久久综合久久美利坚合众国 | 国内精品久久久久影院优| 久久久精品人妻一区二区三区蜜桃 | 91精品国产色综久久| 久久精品国产亚洲欧美| 久久久久久亚洲精品成人| 2021久久精品免费观看| 久久精品国产亚洲αv忘忧草 | 国产精品一久久香蕉国产线看| 久久亚洲精品成人AV| 日本强好片久久久久久AAA| 久久超乳爆乳中文字幕| 国内精品九九久久久精品| 久久国产免费观看精品3| 免费国产99久久久香蕉| 狠狠人妻久久久久久综合蜜桃| 热久久国产欧美一区二区精品| 亚洲午夜久久久|