Beta version. Ready for integration test.

* stop main work thread using custom raise and run it after stop finished.

Change-Id: I18b0e703805d600fe4a7a2a7c34a45c321c57685