From ec05778d5718a7912e506764d443a78d6a6179e3 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 5 Nov 2012 22:41:51 +0000 Subject: Converted tabs to spaces with tabconv. --- src/tests/threadid.cpp | 78 +++++++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) (limited to 'src/tests/threadid.cpp') diff --git a/src/tests/threadid.cpp b/src/tests/threadid.cpp index 9ff99df..dfea504 100644 --- a/src/tests/threadid.cpp +++ b/src/tests/threadid.cpp @@ -9,64 +9,64 @@ using namespace Bu; class CopyThing { public: - CopyThing() - { - TRACE(); - tidHome = Thread::currentThread(); - } - - CopyThing( const CopyThing &rSrc ) - { - TRACE(); - tidHome = Thread::currentThread(); - sio << "Same thread? " << (tidHome == rSrc.tidHome) << sio.nl; - } - - void doThings() - { - TRACE(); - if( tidHome != Thread::currentThread() ) - sio << "Different threads, hard copy here." << sio.nl; - else - sio << "Same thread, everything is cool." << sio.nl; - } + CopyThing() + { + TRACE(); + tidHome = Thread::currentThread(); + } + + CopyThing( const CopyThing &rSrc ) + { + TRACE(); + tidHome = Thread::currentThread(); + sio << "Same thread? " << (tidHome == rSrc.tidHome) << sio.nl; + } + + void doThings() + { + TRACE(); + if( tidHome != Thread::currentThread() ) + sio << "Different threads, hard copy here." << sio.nl; + else + sio << "Same thread, everything is cool." << sio.nl; + } private: - ThreadId tidHome; + ThreadId tidHome; }; class SubThread : public Thread { public: - SubThread( CopyThing &src ) : - src( src ) - { - src.doThings(); - } + SubThread( CopyThing &src ) : + src( src ) + { + src.doThings(); + } protected: - void run() - { - src.doThings(); - sio << "run-Child is me? " << (getId() == Thread::currentThread()) << sio.nl; - } + void run() + { + src.doThings(); + sio << "run-Child is me? " << (getId() == Thread::currentThread()) << sio.nl; + } private: - CopyThing src; + CopyThing src; }; int main( int argc, char *argv[] ) { - CopyThing a; + CopyThing a; - SubThread st( a ); - st.start(); + SubThread st( a ); + st.start(); - sio << "Child is me? " << (st.getId() == Thread::currentThread()) << sio.nl; + sio << "Child is me? " << (st.getId() == Thread::currentThread()) << sio.nl; - st.join(); + st.join(); - return 0; + return 0; } -- cgit v1.2.3