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:
parent
61fed21b04
commit
b02ce81171
@ -82,11 +82,11 @@ MessageLooper::Quit()
|
||||
\param code ID code of the message to post
|
||||
*/
|
||||
status_t
|
||||
MessageLooper::PostMessage(int32 code)
|
||||
MessageLooper::PostMessage(int32 code, bigtime_t timeout)
|
||||
{
|
||||
BPrivate::LinkSender link(MessagePort());
|
||||
link.StartMessage(code);
|
||||
return link.Flush();
|
||||
return link.Flush(timeout);
|
||||
}
|
||||
|
||||
|
||||
|
@ -22,7 +22,7 @@ class MessageLooper : public BLocker {
|
||||
virtual bool Run();
|
||||
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; }
|
||||
bool IsQuitting() const { return fQuitting; }
|
||||
sem_id DeathSemaphore() const { return fDeathSemaphore; }
|
||||
|
Loading…
Reference in New Issue
Block a user