activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r689639 - in /activemq/activemq-cpp/trunk/src/main/decaf/lang: Thread.cpp Thread.h
Date Wed, 27 Aug 2008 22:04:14 GMT
Author: tabish
Date: Wed Aug 27 15:04:13 2008
New Revision: 689639

URL: http://svn.apache.org/viewvc?rev=689639&view=rev
Log:
Add Thread::yield()

Modified:
    activemq/activemq-cpp/trunk/src/main/decaf/lang/Thread.cpp
    activemq/activemq-cpp/trunk/src/main/decaf/lang/Thread.h

Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/Thread.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/Thread.cpp?rev=689639&r1=689638&r2=689639&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/Thread.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/Thread.cpp Wed Aug 27 15:04:13 2008
@@ -98,6 +98,11 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
+void Thread::yeild() {
+    apr_thread_yeild();
+}
+
+////////////////////////////////////////////////////////////////////////////////
 unsigned long Thread::getId() {
     return (unsigned long)( apr_os_thread_current() );
 }

Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/Thread.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/Thread.h?rev=689639&r1=689638&r2=689639&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/Thread.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/Thread.h Wed Aug 27 15:04:13 2008
@@ -113,6 +113,12 @@
         static void sleep( int millisecs );
 
         /**
+         * Causes the currently executing thread object to temporarily pause
+         * and allow other threads to execute.
+         */
+        static void yeild();
+
+        /**
          * Obtains the Thread Id of the current thread
          * @return Thread Id
          */



Mime
View raw message