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
*/