Cleanup:
* Got rid of unused BLooper members * renamed fTaskID to fThread * Removed private and deprecated AddLooper()/RemoveLooper()/... stuff; BLooper is now directly calling BLooperList methods. * Got rid of extensive and useless comments * Made a few TODOs more clear * Merged InitData() and InitData(...) to _InitData(...) * BLooper::Team() now uses BPrivate::current_team(), sTeamID is gone now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19966 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright 2001-2006, Haiku.
|
||||
* Copyright 2001-2007, Haiku.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Erik Jaesler ([email protected])
|
||||
* Jerome Duval
|
||||
* Axel Dörfler, [email protected]
|
||||
*/
|
||||
|
||||
|
||||
@@ -483,17 +484,13 @@ BApplication::Run()
|
||||
if (fRunCalled)
|
||||
debugger("BApplication::Run was already called. Can only be called once.");
|
||||
|
||||
// Note: We need a local variable too (for the return value), since
|
||||
// fTaskID is cleared by Quit().
|
||||
// ToDo: actually, it's not clobbered there?!
|
||||
thread_id thread = fTaskID = find_thread(NULL);
|
||||
|
||||
fThread = find_thread(NULL);
|
||||
fRunCalled = true;
|
||||
|
||||
task_looper();
|
||||
|
||||
delete fPulseRunner;
|
||||
return thread;
|
||||
return fThread;
|
||||
}
|
||||
|
||||
|
||||
@@ -514,7 +511,7 @@ BApplication::Quit()
|
||||
// Delete the object, if not running only.
|
||||
if (!fRunCalled) {
|
||||
delete this;
|
||||
} else if (find_thread(NULL) != fTaskID) {
|
||||
} else if (find_thread(NULL) != fThread) {
|
||||
// ToDo: why shouldn't we set fTerminating to true directly in this case?
|
||||
// We are not the looper thread.
|
||||
// We push a _QUIT_ into the queue.
|
||||
|
||||
Reference in New Issue
Block a user