From commits-return-11722-apmail-activemq-commits-archive=activemq.apache.org@activemq.apache.org Mon Sep 14 21:37:32 2009 Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 2968 invoked from network); 14 Sep 2009 21:37:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Sep 2009 21:37:32 -0000 Received: (qmail 36401 invoked by uid 500); 14 Sep 2009 21:37:32 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 36365 invoked by uid 500); 14 Sep 2009 21:37:32 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 36356 invoked by uid 99); 14 Sep 2009 21:37:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Sep 2009 21:37:32 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Sep 2009 21:37:30 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5DF4523888D7; Mon, 14 Sep 2009 21:37:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r814871 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Thread.cpp Date: Mon, 14 Sep 2009 21:37:10 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090914213710.5DF4523888D7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tabish Date: Mon Sep 14 21:37:09 2009 New Revision: 814871 URL: http://svn.apache.org/viewvc?rev=814871&view=rev Log: Remove commented out APR thread code and cleanup TODO's Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Thread.cpp Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Thread.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Thread.cpp?rev=814871&r1=814870&r2=814871&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Thread.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Thread.cpp Mon Sep 14 21:37:09 2009 @@ -52,7 +52,6 @@ /** * APR Thread Handle */ - //apr_thread_t* threadHandle; std::auto_ptr threadHandle; /** @@ -122,8 +121,6 @@ // Indicate we are done. properties->state = Thread::TERMINATED; - // apr_thread_exit( self, APR_SUCCESS ); - // return NULL; } }; @@ -192,21 +189,6 @@ "Thread::start - Thread already started"); } -// DecafRuntime* runtime = dynamic_cast( Runtime::getRuntime() ); -// -// apr_status_t err = apr_thread_create( -// &this->properties->threadHandle, -// NULL, -// this->properties->runCallback, -// this->properties.get(), -// runtime->getGlobalPool() ); -// -// if( err != APR_SUCCESS ) { -// throw Exception( -// __FILE__, __LINE__, -// "Thread::start - Could not start thread"); -// } - this->properties->threadHandle.reset( ThreadImpl::create( this, this->properties->runCallback, this->properties.get() ) ); @@ -227,8 +209,6 @@ } if( this->properties->state != Thread::TERMINATED ) { -// apr_status_t threadReturn; -// apr_thread_join( &threadReturn, this->properties->threadHandle ); ThreadImpl::join( this->properties->threadHandle.get() ); } } @@ -270,7 +250,7 @@ //////////////////////////////////////////////////////////////////////////////// void Thread::sleep( long long millisecs ) throw( decaf::lang::exceptions::InterruptedException, - decaf::lang::exceptions::IllegalArgumentException ) { + decaf::lang::exceptions::IllegalArgumentException ) { if( millisecs < 0 ) { throw IllegalArgumentException( @@ -284,7 +264,7 @@ //////////////////////////////////////////////////////////////////////////////// void Thread::sleep( long long millisecs, unsigned int nanos ) throw( decaf::lang::exceptions::InterruptedException, - decaf::lang::exceptions::IllegalArgumentException ) { + decaf::lang::exceptions::IllegalArgumentException ) { if( millisecs < 0 ) { throw IllegalArgumentException( @@ -298,21 +278,16 @@ "Thread::sleep( millisecs, nanos ) - Nanoseconds must be in range [0...999999]" ); } - // TODO -- Add in nanos - -// apr_sleep( (apr_interval_time_t)(millisecs * 1000) ); ThreadImpl::sleep( millisecs, nanos ); } //////////////////////////////////////////////////////////////////////////////// void Thread::yield() { - //apr_thread_yield(); ThreadImpl::yeild(); } //////////////////////////////////////////////////////////////////////////////// long long Thread::getId() { - //return (unsigned long)( apr_os_thread_current() ); return ThreadImpl::getThreadId(); }