diff options
author | Mikhail Voitenko <mav@openoffice.org> | 2003-11-20 14:55:19 +0000 |
---|---|---|
committer | Mikhail Voitenko <mav@openoffice.org> | 2003-11-20 14:55:19 +0000 |
commit | 379164d76f79ff2ae0de4ed3dfece6e7432779eb (patch) | |
tree | 3b8a3c67d6d3e274184fd3ec25beab7bd7a4765d /embeddedobj/test/MainThreadExecutor | |
parent | 3afcddd235e5991a73c6804e6fd0ba993b401868 (diff) |
#112923# use Any( void ) return type
Diffstat (limited to 'embeddedobj/test/MainThreadExecutor')
-rw-r--r-- | embeddedobj/test/MainThreadExecutor/xexecutor.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/embeddedobj/test/MainThreadExecutor/xexecutor.cxx b/embeddedobj/test/MainThreadExecutor/xexecutor.cxx index 2bf2de5cca54..2dd14333b7f8 100644 --- a/embeddedobj/test/MainThreadExecutor/xexecutor.cxx +++ b/embeddedobj/test/MainThreadExecutor/xexecutor.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xexecutor.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: mav $ $Date: 2003-11-20 09:16:28 $ + * last change: $Author: mav $ $Date: 2003-11-20 15:55:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,6 +61,7 @@ #include "xexecutor.hxx" #include <vcl/svapp.hxx> +#include <osl/thread.hxx> using namespace ::com::sun::star; @@ -79,6 +80,8 @@ IMPL_LINK( MainThreadExecutor_Impl, executor, void*, pDummyParam ) } m_bExecuted = sal_True; + delete this; + return 0; } @@ -111,11 +114,11 @@ uno::Any SAL_CALL UNOMainThreadExecutor::execute( const uno::Sequence< beans::Na MainThreadExecutor_Impl* pExecutor = new MainThreadExecutor_Impl( xJob, aArgsForJob ); pExecutor->execute(); - while( !pExecutor->isExecuted() ) - Application::Yield(); + // it is not a main thread, so it can be blocked + // while( !pExecutor->isExecuted() ) + // ::osl::Thread::yield(); // TODO: implement transfering of the return values and exceptions - delete pExecutor; return uno::Any(); } |