Replaced call to system with call to cin.get.

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1153 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
rich_sposato 2011-10-17 20:00:02 +00:00
parent 034ebb042c
commit ac16c24fb5

View file

@ -1,12 +1,12 @@
////////////////////////////////////////////////////////////////////////////////
// Test program for The Loki Library
// Copyright (c) 2006 Richard Sposato
// Permission to use, copy, modify, distribute and sell this software for any
// purpose is hereby granted without fee, provided that the above copyright
// notice appear in all copies and that both that copyright notice and this
// Permission to use, copy, modify, distribute and sell this software for any
// purpose is hereby granted without fee, provided that the above copyright
// notice appear in all copies and that both that copyright notice and this
// permission notice appear in supporting documentation.
// The authors make no representations about the
// suitability of this software for any purpose. It is provided "as is"
// The authors make no representations about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
////////////////////////////////////////////////////////////////////////////////
@ -425,18 +425,23 @@ void * Run( void * id )
void DoLockedPtrTest( void )
{
cout << "Doing thread-locked pointer tests." << endl;
char ender;
SafeA::GetIt();
UnsafeA::GetIt();
::system( "pause" );
cout << "Doing thread-locked pointer tests." << endl;
cout << "Press <Enter> key to start test. " << endl;
cin.get( ender );
{
ThreadPool pool;
pool.Create( 5, RunLocked );
pool.Start();
pool.Join();
}
cout << "Doing thread-unsafe pointer tests." << endl;
::system( "pause" );
cout << "Press <Enter> key to start test. " << endl;
cin.get( ender );
{
ThreadPool pool;
pool.Create( 5, Run );
@ -451,22 +456,25 @@ void DoLockedPtrTest( void )
void DoLockedStorageTest( void )
{
cout << "Doing LockedStorage tests." << endl;
char ender;
SelfLockedA::GetIt();
::system( "pause" );
cout << "Doing LockedStorage tests." << endl;
cout << "Press <Enter> key to start test. " << endl;
cin.get( ender );
{
ThreadPool pool;
pool.Create( 5, RunLockedStorage );
pool.Start();
pool.Join();
}
::system( "pause" );
cout << "Press <Enter> key when ready. " << endl;
cin.get( ender );
SelfLockedA::Destroy();
}
// ----------------------------------------------------------------------------
#endif //#ifdef using multi-threaded model
#endif //#ifdef using multi-threaded model
// ----------------------------------------------------------------------------