Synchronize thread destruction in signal test

This commit is contained in:
Christian Helmuth 2019-02-15 14:38:51 +01:00 committed by Norman Feske
parent 3d6f4979c3
commit 1c1cbb9b95
1 changed files with 11 additions and 0 deletions

View File

@ -131,6 +131,17 @@ class Handler : Thread
Thread::start();
}
~Handler()
{
Signal_context context;
Signal_context_capability context_cap { _receiver.manage(&context) };
_stop = true;
Signal_transmitter(context_cap).submit();
Thread::join();
_receiver.dissolve(&context);
}
void print(Output &output) const { Genode::print(output, "handler ", _id); }
/***************