コード例 #1
0
ファイル: QuitTest.cpp プロジェクト: SummerSnail2014/haiku
/**
	Quit()
	@case	Looper is unlocked
	@result	Prints message "ERROR - you must Lock a looper before calling
			Quit(), team=%ld, looper=%s\n"
 */
void
TQuitTest::QuitTest1()
{
	BLooper* looper = new BLooper;
	looper->Unlock();
	looper->Quit();
}
コード例 #2
0
ファイル: CannaMethod.cpp プロジェクト: mt819/CannaIM
CannaMethod::~CannaMethod()
{
	BLooper *looper = NULL;
	cannaLooper.Target( &looper );
	if ( looper != NULL )
	{
#ifdef DEBUG
	SERIAL_PRINT(( "CannaIM:Locking CannaLooper...\n" ));
#endif
		if ( looper->Lock() )
#ifdef DEBUG
	SERIAL_PRINT(( "CannaIM:CannaLooper locked. Calling Quit().\n" ));
#endif
			looper->Quit();
	}
	WriteSettings();
}