chxavthread.cpp
上传用户:zhongxx05
上传日期:2007-06-06
资源大小:33641k
文件大小:1k
- /*============================================================================*
- *
- * (c) 1995-2002 RealNetworks, Inc. Patents pending. All rights reserved.
- *
- *============================================================================*/
-
- /*
- Helpers for 'pumping' active object requests
- */
- // Symbian includes...
- #include <e32base.h>
- #include <e32std.h>
- // Helix includes...
- #include "hxassert.h"
- // Other includes...
- #include "chxavthread.h"
- ////////////////////////////////////////////
- //
- // service next active object request for this thread,
- // blocking if necessary
- //
- void CHXAvThread::WaitAndProcessNextRequest()
- {
- User::WaitForAnyRequest();
- TInt errorIgnored;
- TBool bAtLeastOne = CActiveScheduler::RunIfReady(errorIgnored, 0);
- }
- ////////////////////////////////////////////
- //
- // service outstanding active object requests
- // for this thread; do not block
- //
- void CHXAvThread::ProcessPendingRequests()
- {
- //
- // make sure there are outstanding requests before
- // we wait so we are guarenteed not to block
- //
- while( 0 != RThread().RequestCount() )
- {
- WaitAndProcessNextRequest();
- }
- }