summaryrefslogtreecommitdiffstats
path: root/src/boost-test.cpp
diff options
context:
space:
mode:
authorLothar May <lothar.imap@googlemail.com>2010-10-22 22:04:16 (GMT)
committerLothar May <lothar.imap@googlemail.com>2010-10-22 22:04:16 (GMT)
commita3d5a8e958e9a0ace7f1b9f81062d7d04ccef6b9 (patch)
treee9650804b10510321d0aa461a82571a14a676be1 /src/boost-test.cpp
parentc988d7fac7a0d85e8af245bc89333ee73b369011 (diff)
downloadmxe-a3d5a8e958e9a0ace7f1b9f81062d7d04ccef6b9.zip
mxe-a3d5a8e958e9a0ace7f1b9f81062d7d04ccef6b9.tar.gz
mxe-a3d5a8e958e9a0ace7f1b9f81062d7d04ccef6b9.tar.bz2
improved test program and portability patches for package boost
Diffstat (limited to 'src/boost-test.cpp')
-rw-r--r--src/boost-test.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/boost-test.cpp b/src/boost-test.cpp
index ea809fe..baccf94 100644
--- a/src/boost-test.cpp
+++ b/src/boost-test.cpp
@@ -3,6 +3,18 @@
#include <iostream>
#include <boost/archive/xml_oarchive.hpp>
+#include <boost/thread/thread.hpp>
+#include <boost/thread/tss.hpp>
+
+boost::thread_specific_ptr<int> ptr;
+
+void test_thread()
+{
+ if (ptr.get() == 0) {
+ ptr.reset(new int(0));
+ }
+ std::cout << "Hello, World! from thread" << std::endl;
+}
int main(int argc, char *argv[])
{
@@ -13,5 +25,8 @@ int main(int argc, char *argv[])
std::string s = "\n\n Hello, World!\n\n";
oa << BOOST_SERIALIZATION_NVP(s);
+ boost::thread thrd(test_thread);
+ thrd.join();
+
return 0;
}