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:
Axel Dörfler
2005-12-12 13:12:51 +00:00
parent 61fed21b04
commit b02ce81171
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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);
} }
+1 -1
View File
@@ -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; }