亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? wy_thread.3wy

?? 一個不錯
?? 3WY
字號:
.\".\" Edited by I.J.Wang, 2004.\".TH Wy_Thread 3wy "libwy v0.31".SH NAMEWy_Thread \- class to handle thread.SH SYNOPSIS.B #include <wy_thread.h>.PPWy_Thread is the class that the member tmain() can be run in a created thread..PPNote: Classes and functions of this library are mostly not aimed for      access by more than one thread concurrently except WyOnce,      WyMutex, Wy_Thread and a few other functions. Functions or      members are cancellation points if and only if they are       wrappers of documented C-library functions which are also      cancellation points. Refer to "Programming with POSIX Thread"      [David R. Butenhof, p147-148] for POSIX cancellation points..PPImplementation Note:      Wy_Thread is composed of pthread functions, thread detatch      state cannot be modified.      Current version is based on the C++ implement that cancellation      and thread exit function will unwind the stack. Therefore,       function that contains cancellation points or uses      Wy_Thread::exit should not have throw specification without      cancellation disabled..PP\fBBasic Usage\fP: 1. Declare an object of the application class that inherits Wy_Thread    and reimplements tmain() to run in the created thread. 2. Call begin(), then tmain() is scheduled to run in a created thread. Example:   #include <wytimespec.h>   #include <wy_thread.h>   #include <wy_uty.h>   class Thread : public Wy_Thread {       WyTimeSpec dtime;     // delay time     public:       Thread() : dtime("1.5") /*1.5 seconds*/ {};       ~Thread() throw() {         tmain_close();      // stop a possibly active thread       };     protected:       WyRet tmain(void) {   // reimplement the default tmain()         for(int i=0; i<5; ++i) {           Wy::sleep(dtime);           Wy::cerr << 'Z';         }         return(Ok);       };   };   int main(void)   try {     WyRet r;     Thread thrd;               // declare a Thread object     if((r=thrd.begin())!=Ok) { // begin a new thread to run tmain()       WY_THROW(r);     }     if((r=thrd.wait_not(Wy_Thread::Active))!=Ok) {       WY_THROW(r);                                      }     return(0);   }   catch(const WyRet& e) {     Wy::cerr << Wy::wrd(e) << '\\n';     throw;   }   catch(...) {     Wy::cerr << "Unidentified throw object\\n";     throw;   };.SH "PUBLIC MEMBERS" class \fBReply\fP : public WyRet enum ThreadState { \fBNull\fP, \fBActive\fP, \fBStopped\fP } enum CancelType { \fBDeferred\fP, \fBAsynchronous\fP } \fBWy_Thread\fP() virtual \fB~Wy_Thread\fP() throw() bool \fBis_default\fP(void) const Wy_ThreadID \fBthread_id\fP(void) const ThreadState \fBthread_state\fP(void) const WyRet \fBexitcode\fP(void) const virtual WyRet \fBreset\fP(void) virtual WyRet \fBbegin\fP(void) virtual WyRet \fBcancel\fP(void) virtual WyRet \fBwait_not\fP(ThreadState) static Wy_ThreadID \fBthread_self\fP(void) static WyRet \fByield\fP(void) static Wy_Thread* \fBtbase_ptr\fP(void) static bool \fBset_cancelable\fP(bool) static CancelType \fBset_canceltype\fP(CancelType) static void \fBcancel_point\fP(void) static void \fBexit\fP(WyRet) static size_t \fBactive_threads\fP(void) static size_t \fBmax_threads\fP(void) throw().SH "PROTECTED MEMBERS" virtual WyRet \fBtmain\fP(void) void \fBtmain_close\fP(void) throw().SH "DESCRIPTION".\"--------------------------------------------.PP.BI "class Reply : public WyRet".PP    Class specific throw type.\"--------------------------------------------.PP.BI "enum ThreadState"           Null ...... No thread           Active .... Thread is begun           Stopped ... Thread terminated.\"--------------------------------------------.PP.BI "enum CancelType"           Deferred ....... cancel on cancellation point           Asynchronous ... cancel as soon as requested.\"--------------------------------------------.PP.BI "Wy_Thread()".PP    Construct default object      thread_state()= Null      thread_id()   = Wy_ThreadID()      exitcode()    = WyRet().PP    [\fBThrow\fP] Reply            Wym_ENOMEM      Not enough memory.\"--------------------------------------------.PP.BI "virtual ~Wy_Thread() throw()".PP    Destruct *this.PP    Note: If the thread is of Defered cancellation type, tmain()          should make sure cancellation points are executed in a          given time interval to avoid the destructor (or reset())          waiting for indefinite time.    Note: All destructor of the inheriting classes should stop an          active thread from accessing the about-to-be-destroyed          data members, \fBsee tmain_close\fP()..\"--------------------------------------------.PP.BI "bool is_default(void) const".PP    Is *this equivalent to the default object.PP    [\fBRet\fP] true= *this is equivalent to Wy_Thread().         false= otherwise.\"--------------------------------------------.PP.BI "Wy_ThreadID thread_id(void) const".PP    Get the ID of the thread that runs tmain().PP     [\fBRet\fP] Wy_ThreadID, thread ID of tmain()..\"--------------------------------------------.PP.BI "ThreadState thread_state(void) const".PP    Get the thread state.PP     [\fBRet\fP] enum ThreadSate of the following:          Null ...... No thread          Active .... Thread is begun          Stopped ... Thread terminated.\"--------------------------------------------.PP.BI "WyRet exitcode(void) const".PP    Get the tmain() exit code..PP     [\fBRet\fP] WyRet that tmain() returned or exited with          Default object gets default WyRet. The value is not          defined if the thread is in Active state. If the           thread was cancelled, Wym_ETHRDCAN is returned..\"--------------------------------------------.PP.BI "virtual WyRet reset(void)".PP    Reset *this to the state as Wy_Thread()    The Active tmain() thread will get a cancel request. Function    waits until the thread is terminated.    Note: tmain() should not reset itself. Behavior in this illegal          case is unspecified (implementation may throw WyRet).PP     [\fBRet\fP] Ok               Succeed.\"--------------------------------------------.PP.BI "virtual WyRet begin(void)".PP    Creates a thread to run tmain().    The thread is created as if the following functions called:    set_cancelable(true);    set_canceltype(CancelType::Deferred);.PP     [\fBRet\fP] Ok               Succeed. Thread is created and scheduled                           to run tmain(). Thread state is Active.          Wym_EBADF        Thread state is not Null          Wym_ENFILE       active_threads() has reaches max_threads()          Wym_EAGAIN       Not enough system resource          Wym_ENOMEM       Not enough memory.PP     [\fBRefer\fP] ::pthread_create.\"--------------------------------------------.PP.BI "virtual WyRet cancel(void)".PP    Send request to cancel(stop) the thread created..PP     [\fBRet\fP] Ok               Succeed. Cancel request is sent.                           The thread may not be terminated yet.          Wym_ESRCH        No thread found          Wym_EPERM        tmain() can not cancel itself.PP     [\fBRefer\fP] ::pthread_cancel.\"--------------------------------------------.PP.BI "virtual WyRet wait_not(ThreadState " "state" ")".PP    Wait until thread state is detected not \fIstate\fP.PP     [\fBRet\fP] Ok               Succeed. thread state is not \fIstate\fP          Wym_EPERM        tmain() cannot wait on itself.PP     [\fBRefer\fP] ::pthread_cond_wait.\"--------------------------------------------.SH "PUBLIC STATIC MEMBERS".PP.BI "static Wy_ThreadID thread_self(void)".PP    Get the thread ID of the calling thread.PP     [\fBRet\fP] Wy_ThreadID of the calling thread..PP     [\fBRefer\fP] ::pthread_self.\"--------------------------------------------.PP.BI "static WyRet yield(void)".PP    Try yielding for other threads to resume execution..PP     [\fBRet\fP] Ok               Succeed.          ...              do not care for now.PP     [\fBRefer\fP] ::sched_yield.\"--------------------------------------------.PP.BI "static Wy_Thread* tbase_ptr(void)".PP    Get the handling Wy_Thread object of the calling thread    Note: This member is primarily for the function that is not          a member of the reimplemented thread class. Cast the           returned pointer to the deriving thread class to access          members of that class object.    Note: Implementation searches internal tables, which may be           considered slow..PP     [\fBRet\fP] Pointer to the Wy_Thread object of the calling thread.          NULL= the calling thread is not created by Wy_Thread.\"--------------------------------------------.PP.BI "static bool set_cancelable(bool " "en" ")".PP    Enable(\fIen\fP==true) or disable(\fIen\fP==false) the calling thread to    respond to the cancel request.PP     [\fBRet\fP] Previous cancellability of the calling thread.          true = cancellable.          false= not cancellable..PP     [\fBRefer\fP] ::pthread_setcancelstate.\"--------------------------------------------.PP.BI "static CancelType set_canceltype(CancelType " "type" ")".PP    Set the type of response to cancellation request    Warning: Library functions and classes are mostly not              implemented for asynchronous type of cancellation.             Users have to know the physical effect to use this             type of cancellation..PP     [\fBRet\fP] Previous cancel type of the calling thread..PP     [\fBRefer\fP] ::pthread_setcanceltype.\"--------------------------------------------.PP.BI "static void cancel_point(void)".PP    Cancellation(Defered type) may take place in this function,     nothing is otherwise done..PP     [\fBRefer\fP] ::pthread_testcancel.\"--------------------------------------------.PP.BI "static void exit(WyRet r)".PP    Exit the calling thread (by stack unwind) and set exitcode as \fIr\fP.PP     [\fBRefer\fP] ::pthread_exit.\"--------------------------------------------.PP.BI "static size_t active_threads(void)".PP    Get the number of threads in Active state(created by this class).PP     [\fBRet\fP] Number of active threads.\"--------------------------------------------.PP.BI "static size_t max_threads(void) throw()".PP    Get the maximum number of threads this class can create.PP     [\fBRet\fP] The maximum number of threads this class can create.\"--------------------------------------------.SH "PROTECTED MEMBERS".PP.BI "virtual WyRet tmain(void)".PP    Reimplement this function to run the created thread    The default function immediately returns WyRet(Ok)    Note: tmain() is not allowed to use non-static members to          manipulate itself (other threads are fine).\"--------------------------------------------.PP.BI "void tmain_close(void) throw()".PP    Cancel the possibly active thread and disable cancellability    of the calling thread. This member is supposedly called only    in the destructor.    Destructor of inheriting classes should stop the possibly active    thread from accessing the about-to-be-destroyed data members.       For example, definition of inheriting destructors would be like    the following:      class T : public Wy_Thread {        public:          ~T() {            tmain_close();  // cancel active thread and disable                            // cancellability of the destructor.            ...             // others          };      };.PP     [\fBRefer\fP] ::pthread_cancel.\"--------------------------------------------.SH "SEE ALSO".BR wyret.BR wymutex.BR wylock.BR wycond.BR wyonce.BR wytimespec.BR wy_threadid.SH NOTEProject is in development, http://sourceforge.net/projects/libwx

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
不卡av在线免费观看| 欧美日韩久久一区| 337p日本欧洲亚洲大胆精品| 免费看日韩精品| 欧美精品久久99久久在免费线| 亚洲综合免费观看高清完整版在线 | 欧美不卡一二三| 狠狠色丁香婷婷综合久久片| 国产亚洲精品免费| zzijzzij亚洲日本少妇熟睡| 国产精品久久免费看| 色婷婷亚洲婷婷| 午夜不卡av免费| 欧美变态tickling挠脚心| 精品一区二区三区蜜桃| 国产精品你懂的| 日本韩国欧美国产| 一区二区三区在线观看网站| 在线播放日韩导航| 2019国产精品| 久久综合精品国产一区二区三区| 国产伦精品一区二区三区免费| 国产欧美久久久精品影院| 日本道精品一区二区三区 | 青青国产91久久久久久| 久久久777精品电影网影网| 91农村精品一区二区在线| 91精品黄色片免费大全| 国产成人午夜电影网| 一区二区三区在线免费观看| 日韩欧美另类在线| 亚洲精品一二三| 欧美精品在线视频| 丰满少妇久久久久久久| 日韩成人免费在线| 国产精品久久久久久久久免费樱桃 | 97久久超碰国产精品| 男人操女人的视频在线观看欧美| 不卡一区二区中文字幕| 图片区小说区区亚洲影院| 中文字幕av资源一区| 亚洲日本护士毛茸茸| 欧美中文字幕不卡| 国产寡妇亲子伦一区二区| 欧美日韩国产片| 成人a级免费电影| 免费观看日韩av| 亚洲视频中文字幕| 精品国产一区久久| 欧美日韩成人综合在线一区二区| 国产ts人妖一区二区| 免费欧美高清视频| 欧美亚洲综合久久| 国产精品亚洲а∨天堂免在线| 天天色天天爱天天射综合| 自拍偷自拍亚洲精品播放| 久久欧美中文字幕| 91精品国产色综合久久不卡电影 | 国产欧美精品一区| 91精品国产高清一区二区三区蜜臀 | 在线日韩一区二区| 99久久伊人精品| 韩国精品一区二区| 麻豆成人久久精品二区三区红| 亚洲欧洲精品天堂一级| 国产日韩欧美一区二区三区综合| 欧美一区二区视频在线观看2020| 欧美色中文字幕| 欧美午夜精品理论片a级按摩| 99精品国产一区二区三区不卡| 国产成人精品免费| 国产精品69毛片高清亚洲| 国产在线一区二区| 久久99精品国产麻豆婷婷洗澡| 日韩成人av影视| 日韩电影免费在线观看网站| 视频一区视频二区中文字幕| 五月综合激情婷婷六月色窝| 午夜精品福利久久久| 视频一区二区中文字幕| 日本不卡123| 极品少妇xxxx精品少妇| 精品一区二区免费看| 国产一区二区中文字幕| 国产精品456| 国产美女av一区二区三区| 丁香婷婷综合色啪| 99久久精品免费看国产免费软件| 成人黄色软件下载| 成人三级伦理片| 色婷婷av一区二区三区之一色屋| 夜夜爽夜夜爽精品视频| 亚洲大片免费看| 麻豆成人久久精品二区三区红 | 国产欧美日韩三区| 中文av字幕一区| 一区二区三区中文字幕精品精品 | 日韩黄色在线观看| 蜜臀精品一区二区三区在线观看| 国产资源在线一区| www.日韩av| 欧美电影在线免费观看| 精品精品国产高清a毛片牛牛| 日本一区二区不卡视频| 亚洲精品乱码久久久久久久久| 午夜久久久影院| 麻豆91免费看| 9色porny自拍视频一区二区| 在线日韩一区二区| 日韩视频免费观看高清完整版在线观看 | 国产成人综合亚洲网站| 91麻豆自制传媒国产之光| 欧美精品乱人伦久久久久久| 久久久久久久网| 亚洲一区二区三区美女| 久久超碰97人人做人人爱| 99亚偷拍自图区亚洲| 欧美一区二区国产| 国产精品福利一区| 毛片基地黄久久久久久天堂| 国产成人综合亚洲网站| 欧美日韩在线观看一区二区| 久久久www成人免费毛片麻豆| 亚洲三级小视频| 久久99精品视频| 欧美中文字幕一区二区三区| 久久精品一级爱片| 午夜精品久久久久久不卡8050| 国产成人亚洲精品青草天美| 欧美三级一区二区| 国产精品你懂的| 激情文学综合插| 欧美精品自拍偷拍| 国产精品久久久久久久浪潮网站| 久久激情五月婷婷| 欧美男男青年gay1069videost| 国产精品久久久久一区二区三区| 奇米影视在线99精品| 在线免费观看日本欧美| 国产欧美日韩不卡| 国产乱子伦一区二区三区国色天香| 久久久久久一级片| 日韩黄色小视频| 欧美撒尿777hd撒尿| 亚洲日本免费电影| av综合在线播放| 国产日韩欧美高清| 国产自产视频一区二区三区| 日韩区在线观看| 日韩国产欧美一区二区三区| 在线观看欧美黄色| 一区二区三区**美女毛片| eeuss国产一区二区三区| 久久婷婷久久一区二区三区| 捆绑变态av一区二区三区| 91精品国产综合久久久蜜臀粉嫩 | 亚洲午夜视频在线观看| 91在线porny国产在线看| 国产欧美日韩精品一区| 国产成人丝袜美腿| 日韩欧美视频一区| 久久草av在线| 精品国产乱码久久久久久免费| 美国欧美日韩国产在线播放| 69成人精品免费视频| 热久久一区二区| 日韩手机在线导航| 精品在线免费视频| 精品国内二区三区| 国产一区二三区好的| 2020国产精品| 国产福利一区二区三区视频| 国产清纯美女被跳蛋高潮一区二区久久w | 久久精品在这里| 视频在线观看91| 制服丝袜成人动漫| 免费高清在线视频一区·| 日韩亚洲欧美在线观看| 国内精品在线播放| 国产亚洲一区二区三区| 波多野结衣中文字幕一区 | 日韩美女啊v在线免费观看| 粉嫩13p一区二区三区| 中文字幕欧美激情一区| 国产69精品久久777的优势| 国产亚洲精品免费| 极品少妇xxxx偷拍精品少妇| 国产精品每日更新在线播放网址 | 国产午夜亚洲精品不卡| 国产精品二三区| 欧美三级在线播放| 日韩高清电影一区| 久久久亚洲精华液精华液精华液| 99麻豆久久久国产精品免费优播| 亚洲一区二区三区自拍| 日韩欧美成人激情| 岛国av在线一区| 亚洲mv在线观看| 国产欧美日韩不卡| 欧美日韩一区二区在线观看视频 |