From 1889b55dcbb3f5c5cccc3bcd986b13d0d108ed6c Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 27 Apr 2010 17:07:55 +0000 Subject: The Bu::Ito thread class has changed the rules on the run function. It no longer returns anything, that's fine, it's in a class, but it also is protected now. That doesn't really effect child classes much, they can make run public, but I reccomend protected to avoid confusion. --- src/tests/itoheap.cpp | 4 +--- src/tests/itoqueue1.cpp | 8 ++------ src/tests/itoqueue2.cpp | 8 ++------ src/tests/socketblock.cpp | 4 +--- 4 files changed, 6 insertions(+), 18 deletions(-) (limited to 'src/tests') diff --git a/src/tests/itoheap.cpp b/src/tests/itoheap.cpp index 92bf3cf..347f1e0 100644 --- a/src/tests/itoheap.cpp +++ b/src/tests/itoheap.cpp @@ -23,7 +23,7 @@ public: { } - void *run() + void run() { for( int j = 0; j < 10; j++ ) { @@ -39,8 +39,6 @@ public: printf("Nothing yet...\n"); } } - - return NULL; } Bu::ItoHeap hInt; diff --git a/src/tests/itoqueue1.cpp b/src/tests/itoqueue1.cpp index 815216d..a034c87 100644 --- a/src/tests/itoqueue1.cpp +++ b/src/tests/itoqueue1.cpp @@ -19,7 +19,7 @@ public: { } - void *run() + void run() { for( int i = 0; i < 10; i++ ) { @@ -35,8 +35,6 @@ public: } usleep( (int)(((double)rand())/((double)RAND_MAX)*2000000.0) ); } - - return NULL; } private: @@ -54,7 +52,7 @@ public: { } - void *run() + void run() { for( int i = 0; i < 11; i++ ) { @@ -62,8 +60,6 @@ public: q.enqueue( new std::string( strbase ) ); printf("[%d] write: %s\n", id, strbase ); } - - return NULL; } private: diff --git a/src/tests/itoqueue2.cpp b/src/tests/itoqueue2.cpp index d1f20a4..b11aa32 100644 --- a/src/tests/itoqueue2.cpp +++ b/src/tests/itoqueue2.cpp @@ -19,7 +19,7 @@ public: { } - void *run() + void run() { for( int i = 0; i < 10; i++ ) { @@ -35,8 +35,6 @@ public: delete pStr; } } - - return NULL; } private: @@ -54,7 +52,7 @@ public: { } - void *run() + void run() { for( int i = 0; i < 11; i++ ) { @@ -62,8 +60,6 @@ public: printf("[%d] write: %s\n", id, strbase ); q.enqueue( new std::string( strbase ) ); } - - return NULL; } private: diff --git a/src/tests/socketblock.cpp b/src/tests/socketblock.cpp index 3d50aa0..a1ea18d 100644 --- a/src/tests/socketblock.cpp +++ b/src/tests/socketblock.cpp @@ -19,7 +19,7 @@ public: { } - virtual void *run() + virtual void run() { Bu::Socket c = s.accept( 45, 0 ); printf("TstServer: Accetped connection.\n"); fflush( stdout ); @@ -33,8 +33,6 @@ public: printf("TstServer: Closing connection...\n"); fflush( stdout ); c.close(); - - return NULL; } Bu::ServerSocket s; -- cgit v1.2.3