--HG--
extra : transplant_source : J0p%C1%D3%7F%A5%D5%7Ds%F3%3F%8EG%B4%DD%D5%2A_%B2
This commit is contained in:
Chris Jones 2010-01-13 21:08:35 -06:00
Родитель 53e84d481c
Коммит 9465670838
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -15,7 +15,7 @@ parent:
// tests check shutdown semantics
PTestShutdownSub(bool expectCrash);
// Used to synchronize between parent and child, to avoid racies
// Used to synchronize between parent and child, to avoid races
// around flushing socket write queues
sync Sync();

Просмотреть файл

@ -45,12 +45,16 @@ class TestShutdownSubParent :
public PTestShutdownSubParent
{
public:
TestShutdownSubParent(bool expectCrash) : mExpectCrash(expectCrash)
TestShutdownSubParent(bool expectCrash) :
mExpectCrash(expectCrash),
mDeletedCount(0)
{
}
virtual ~TestShutdownSubParent()
{
if (2 != mDeletedCount)
fail("managees outliving manager!");
}
protected:
@ -66,6 +70,7 @@ protected:
DeallocPTestShutdownSubsub(PTestShutdownSubsubParent* actor)
{
delete actor;
++mDeletedCount;
return true;
}
@ -75,6 +80,7 @@ protected:
private:
bool mExpectCrash;
int mDeletedCount;
};