Anonymous avatar Anonymous committed 541bbe2

vcl122: #i117746# remove ThreadExecutor

Comments (0)

Files changed (2)

vcl/inc/vcl/threadex.hxx

 
 namespace vcl
 {
-	class VCL_DLLPUBLIC ThreadExecutor
-	{
-		oslThread				m_aThread;
-		oslCondition			m_aFinish;
-		long					m_nReturn;
-
-    #ifdef THREADEX_IMPLEMENTATION
-    public:
-		SAL_DLLPRIVATE static void SAL_CALL worker( void* );
-    #endif
-	public:
-		ThreadExecutor();
-		virtual ~ThreadExecutor();
-
-		virtual long doIt() = 0;
-		long execute();
-	};
-
 	class VCL_DLLPUBLIC SolarThreadExecutor
 	{
         oslCondition            m_aStart;

vcl/source/helper/threadex.cxx

 
 using namespace vcl;
 
-ThreadExecutor::ThreadExecutor()
-{
-	m_aFinish = osl_createCondition();
-	m_aThread = NULL;
-}
-
-ThreadExecutor::~ThreadExecutor()
-{
-	osl_destroyCondition( m_aFinish );
-	if( m_aThread )
-		osl_destroyThread( m_aThread );
-}
-
-extern "C"
-{
-    static void call_worker( void* pInstance )
-    {
-        ThreadExecutor::worker( pInstance );
-    }
-}
-
-void ThreadExecutor::worker( void* pInstance )
-{
-	ThreadExecutor* pThis = ((ThreadExecutor*)pInstance);
-	pThis->m_nReturn = pThis->doIt();
-	osl_setCondition( pThis->m_aFinish );
-}
-
-long ThreadExecutor::execute()
-{
-	osl_resetCondition( m_aFinish );
-	if( m_aThread )
-		osl_destroyThread( m_aThread ), m_aThread = NULL;
-	m_aThread = osl_createThread( call_worker, this );
-	while( ! osl_checkCondition( m_aFinish ) )
-		Application::Reschedule();
-	return m_nReturn;
-}
-
-
 SolarThreadExecutor::SolarThreadExecutor()
     :m_nReturn( 0 )
     ,m_bTimeout( false )
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.