From: Dmitry Y. <di...@us...> - 2008-01-28 13:44:17
|
Build Version : T2.5.0.18119 Firebird 2.5 Unstable (writeBuildNum.sh,v 1.18279 2008/01/28 13:44:17 dimitr Exp ) Update of /cvsroot/firebird/firebird2/src/remote In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv17045 Modified Files: server.cpp Log Message: Misc sync changes. Index: server.cpp =================================================================== RCS file: /cvsroot/firebird/firebird2/src/remote/server.cpp,v retrieving revision 1.164 retrieving revision 1.165 diff -b -U3 -r1.164 -r1.165 --- server.cpp 26 Jan 2008 23:23:15 -0000 1.164 +++ server.cpp 28 Jan 2008 13:44:11 -0000 1.165 @@ -228,6 +228,7 @@ static SRVR servers; static Firebird::GlobalPtr<Firebird::Semaphore> requests_semaphore; +static Firebird::GlobalPtr<Firebird::Semaphore> cleanup_semaphore; static const UCHAR request_info[] = @@ -5514,11 +5515,12 @@ else { REMOTE_TRACE(("got it")); } + THREAD_ENTER(); if (shutting_down) { + cleanup_semaphore->release(); return 0; } - THREAD_ENTER(); --threads_waiting; } } @@ -5542,7 +5544,7 @@ * * Functional description * Shutdown working threads, waiting for work - * Function is called when shutdowm thread ENTERed, + * Function is called when shutdown thread ENTERed, * and will never EXIT * **************************************/ @@ -5555,7 +5557,7 @@ } // let them terminate - THREAD_SLEEP(1 * 1000); + cleanup_semaphore->tryEnter(1); } |