You can now specify a timeout to MessageLooper::PostMessage().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15510 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -82,11 +82,11 @@ MessageLooper::Quit()
|
|||||||
\param code ID code of the message to post
|
\param code ID code of the message to post
|
||||||
*/
|
*/
|
||||||
status_t
|
status_t
|
||||||
MessageLooper::PostMessage(int32 code)
|
MessageLooper::PostMessage(int32 code, bigtime_t timeout)
|
||||||
{
|
{
|
||||||
BPrivate::LinkSender link(MessagePort());
|
BPrivate::LinkSender link(MessagePort());
|
||||||
link.StartMessage(code);
|
link.StartMessage(code);
|
||||||
return link.Flush();
|
return link.Flush(timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class MessageLooper : public BLocker {
|
|||||||
virtual bool Run();
|
virtual bool Run();
|
||||||
virtual void Quit();
|
virtual void Quit();
|
||||||
|
|
||||||
status_t PostMessage(int32 code);
|
status_t PostMessage(int32 code, bigtime_t timeout = B_INFINITE_TIMEOUT);
|
||||||
thread_id Thread() const { return fThread; }
|
thread_id Thread() const { return fThread; }
|
||||||
bool IsQuitting() const { return fQuitting; }
|
bool IsQuitting() const { return fQuitting; }
|
||||||
sem_id DeathSemaphore() const { return fDeathSemaphore; }
|
sem_id DeathSemaphore() const { return fDeathSemaphore; }
|
||||||
|
|||||||
Reference in New Issue
Block a user