fix ReceiveTimeout() reference
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
391e70aeed
commit
e815120e41
@ -1,126 +1,126 @@
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%% Name: msgqueue.tex
|
%% Name: msgqueue.tex
|
||||||
%% Purpose: wxMessageQueue
|
%% Purpose: wxMessageQueue
|
||||||
%% Author: Evgeniy Tarassov
|
%% Author: Evgeniy Tarassov
|
||||||
%% Created: 2007-10-31
|
%% Created: 2007-10-31
|
||||||
%% RCS-ID: $Id: $
|
%% RCS-ID: $Id: $
|
||||||
%% Copyright: (C) 2007 TT-Solutions SARL
|
%% Copyright: (C) 2007 TT-Solutions SARL
|
||||||
%% License: wxWindows license
|
%% License: wxWindows license
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
\section{\class{wxMessageQueue<T>}}\label{wxmessagequeue}
|
\section{\class{wxMessageQueue<T>}}\label{wxmessagequeue}
|
||||||
|
|
||||||
wxMessageQueue allows passing messages between threads.
|
wxMessageQueue allows passing messages between threads.
|
||||||
|
|
||||||
This class should be typically used to communicate between the main and worker
|
This class should be typically used to communicate between the main and worker
|
||||||
threads. The main thread calls \helpref{Post()}{wxmessagequeuepost} and
|
threads. The main thread calls \helpref{Post()}{wxmessagequeuepost} and
|
||||||
the worker thread calls \helpref{Receive()}{wxmessagequeuereceive}.
|
the worker thread calls \helpref{Receive()}{wxmessagequeuereceive}.
|
||||||
|
|
||||||
For this class a message is an object of arbitrary type T. Notice that
|
For this class a message is an object of arbitrary type T. Notice that
|
||||||
often there is a some special message indicating that the thread
|
often there is a some special message indicating that the thread
|
||||||
should terminate as there is no other way to gracefully shutdown a thread
|
should terminate as there is no other way to gracefully shutdown a thread
|
||||||
waiting on the message queue.
|
waiting on the message queue.
|
||||||
|
|
||||||
\wxheading{Derived from}
|
\wxheading{Derived from}
|
||||||
|
|
||||||
None.
|
None.
|
||||||
|
|
||||||
\wxheading{Include files}
|
\wxheading{Include files}
|
||||||
|
|
||||||
<wx/msgqueue.h>
|
<wx/msgqueue.h>
|
||||||
|
|
||||||
\wxheading{Library}
|
\wxheading{Library}
|
||||||
|
|
||||||
None, this class implementation is entirely header-based.
|
None, this class implementation is entirely header-based.
|
||||||
|
|
||||||
\wxheading{See also}
|
\wxheading{See also}
|
||||||
|
|
||||||
\helpref{wxThread}{wxthread}
|
\helpref{wxThread}{wxthread}
|
||||||
|
|
||||||
|
|
||||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxMessageQueue::wxMessageQueue}\label{wxmessagequeuector}
|
\membersection{wxMessageQueue::wxMessageQueue}\label{wxmessagequeuector}
|
||||||
|
|
||||||
\func{}{wxMessageQueue}{\void}
|
\func{}{wxMessageQueue}{\void}
|
||||||
|
|
||||||
Default and only constructor. Use \helpref{IsOk}{wxmessagequeueisok} to check
|
Default and only constructor. Use \helpref{IsOk}{wxmessagequeueisok} to check
|
||||||
if the object was successfully initialized.
|
if the object was successfully initialized.
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxMessageQueue::IsOk}\label{wxmessagequeueisok}
|
\membersection{wxMessageQueue::IsOk}\label{wxmessagequeueisok}
|
||||||
|
|
||||||
\constfunc{bool }{IsOk}{\void}
|
\constfunc{bool }{IsOk}{\void}
|
||||||
|
|
||||||
Returns {\tt true} if the object had been initialized successfully, {\tt false}
|
Returns {\tt true} if the object had been initialized successfully, {\tt false}
|
||||||
if an error occurred.
|
if an error occurred.
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxMessageQueue::Post}\label{wxmessagequeuepost}
|
\membersection{wxMessageQueue::Post}\label{wxmessagequeuepost}
|
||||||
|
|
||||||
\func{wxMessageQueueError }{Post}{\param{T const\&}{ msg}}
|
\func{wxMessageQueueError }{Post}{\param{T const\&}{ msg}}
|
||||||
|
|
||||||
Add a message to this queue and signal the threads waiting for messages
|
Add a message to this queue and signal the threads waiting for messages
|
||||||
(i.e. the threads which called \helpref{Receive()}{wxmessagequeuereceive} or
|
(i.e. the threads which called \helpref{Receive()}{wxmessagequeuereceive} or
|
||||||
\helpref{ReceiveTimeout()}{wxmessagequeuereceivetimeout}).
|
\helpref{ReceiveTimeout()}{wxmessagequeuereceivetimeout}).
|
||||||
|
|
||||||
This method is safe to call from multiple threads in parallel.
|
This method is safe to call from multiple threads in parallel.
|
||||||
|
|
||||||
\wxheading{Return value}
|
\wxheading{Return value}
|
||||||
|
|
||||||
One of:
|
One of:
|
||||||
|
|
||||||
\twocolwidtha{7cm}
|
\twocolwidtha{7cm}
|
||||||
\begin{twocollist}\itemsep=0pt
|
\begin{twocollist}\itemsep=0pt
|
||||||
\twocolitem{{\bf wxMSGQUEUE\_NO\_ERROR}}{There was no error.}
|
\twocolitem{{\bf wxMSGQUEUE\_NO\_ERROR}}{There was no error.}
|
||||||
\twocolitem{{\bf wxMSGQUEUE\_MISC\_ERROR}}{A fatal error has occured.}
|
\twocolitem{{\bf wxMSGQUEUE\_MISC\_ERROR}}{A fatal error has occured.}
|
||||||
\end{twocollist}
|
\end{twocollist}
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxMessageQueue::Receive}\label{wxmessagequeuereceive}
|
\membersection{wxMessageQueue::Receive}\label{wxmessagequeuereceive}
|
||||||
|
|
||||||
\func{wxMessageQueueError }{Receive}{\param{T\&}{ msg}}
|
\func{wxMessageQueueError }{Receive}{\param{T\&}{ msg}}
|
||||||
|
|
||||||
Block until a message becomes available in the queue. Waits indefinitely long
|
Block until a message becomes available in the queue. Waits indefinitely long
|
||||||
or until an error occurs.
|
or until an error occurs.
|
||||||
|
|
||||||
The message is returned in \arg{msg}.
|
The message is returned in \arg{msg}.
|
||||||
|
|
||||||
\wxheading{Return value}
|
\wxheading{Return value}
|
||||||
|
|
||||||
One of:
|
One of:
|
||||||
|
|
||||||
\twocolwidtha{7cm}
|
\twocolwidtha{7cm}
|
||||||
\begin{twocollist}\itemsep=0pt
|
\begin{twocollist}\itemsep=0pt
|
||||||
\twocolitem{{\bf wxMSGQUEUE\_NO\_ERROR}}{A message is available.}
|
\twocolitem{{\bf wxMSGQUEUE\_NO\_ERROR}}{A message is available.}
|
||||||
\twocolitem{{\bf wxMSGQUEUE\_MISC\_ERROR}}{A fatal error has occured and no message returned.}
|
\twocolitem{{\bf wxMSGQUEUE\_MISC\_ERROR}}{A fatal error has occured and no message returned.}
|
||||||
\end{twocollist}
|
\end{twocollist}
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxMessageQueue::Receive}\label{wxmessagequeuereceive}
|
\membersection{wxMessageQueue::ReceiveTimeout}\label{wxmessagequeuereceivetimeout}
|
||||||
|
|
||||||
\func{wxMessageQueueError }{ReceiveTimeout}{\param{long}{ timeout}, \param{T\&}{ msg}}
|
\func{wxMessageQueueError }{ReceiveTimeout}{\param{long}{ timeout}, \param{T\&}{ msg}}
|
||||||
|
|
||||||
Block until a message becomes available in the queue, but no more than
|
Block until a message becomes available in the queue, but no more than
|
||||||
\arg{timeout} milliseconds has elapsed.
|
\arg{timeout} milliseconds has elapsed.
|
||||||
|
|
||||||
If no message is available after \arg{timeout} milliseconds then returns
|
If no message is available after \arg{timeout} milliseconds then returns
|
||||||
{\bf wxMSGQUEUE\_TIMEOUT}.
|
{\bf wxMSGQUEUE\_TIMEOUT}.
|
||||||
|
|
||||||
If \arg{timeout} is $0$ then checks for any messages present in the queue
|
If \arg{timeout} is $0$ then checks for any messages present in the queue
|
||||||
and returns immediately without waiting.
|
and returns immediately without waiting.
|
||||||
|
|
||||||
The message is returned in \arg{msg}.
|
The message is returned in \arg{msg}.
|
||||||
|
|
||||||
\wxheading{Return value}
|
\wxheading{Return value}
|
||||||
|
|
||||||
One of:
|
One of:
|
||||||
|
|
||||||
\twocolwidtha{7cm}
|
\twocolwidtha{7cm}
|
||||||
\begin{twocollist}\itemsep=0pt
|
\begin{twocollist}\itemsep=0pt
|
||||||
\twocolitem{{\bf wxMSGQUEUE\_NO\_ERROR}}{A message is available.}
|
\twocolitem{{\bf wxMSGQUEUE\_NO\_ERROR}}{A message is available.}
|
||||||
\twocolitem{{\bf wxMSGQUEUE\_TIMEOUT}}{A timeout has occured. No message read.}
|
\twocolitem{{\bf wxMSGQUEUE\_TIMEOUT}}{A timeout has occured. No message read.}
|
||||||
\twocolitem{{\bf wxMSGQUEUE\_MISC\_ERROR}}{A fatal error has occured.}
|
\twocolitem{{\bf wxMSGQUEUE\_MISC\_ERROR}}{A fatal error has occured.}
|
||||||
\end{twocollist}
|
\end{twocollist}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user