Time to get rid of the horrible coding style

This commit is contained in:
pd 2008-08-01 18:31:43 +02:00
parent 534ee610d8
commit efc594f888
53 changed files with 1137 additions and 1136 deletions

View file

@ -26,7 +26,7 @@ void EchoClient::Echoed( const DBus::Variant& value )
* For some strange reason, libdbus frequently dies with an OOM * For some strange reason, libdbus frequently dies with an OOM
*/ */
static const int THREADS = 16; static const int THREADS = 3;
static bool spin = true; static bool spin = true;
@ -40,7 +40,7 @@ void* greeter_thread( void* arg )
snprintf(idstr, sizeof(idstr), "%lu", pthread_self()); snprintf(idstr, sizeof(idstr), "%lu", pthread_self());
for(int i = 0; i < 100 && spin; ++i) for (int i = 0; i < 30 && spin; ++i)
{ {
cout << client.Hello(idstr) << endl; cout << client.Hello(idstr) << endl;
} }

View file

@ -20,6 +20,7 @@ DBus::Int32 EchoServer::Random()
DBus::String EchoServer::Hello(const DBus::String &name) DBus::String EchoServer::Hello(const DBus::String &name)
{ {
sleep (10);
return "Hello " + name + "!"; return "Hello " + name + "!";
} }