Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /samefile say P.cpp
- // in somefunction
- void send_msg( bla .. bla ..)
- {
- bla ..bla...
- if( client_mine ) //
- {
- std::cout <<" We are in client_mine stmt " // this statement always get printed even just before crashing
- try
- {
- Answer_thread answer_thread( *client_mine );
- bla ..
- bla..
- bla,,
- }
- catch(...)
- {
- std::cout << " Never get caught here " ;
- }
- }
- }
- //in same file
- class Answer_thread
- {
- public:
- Answer_thread( Client_Mine& client_mine )
- : client_mine_( client )
- , thread_( boost::ref( *this ) )
- , sleep_int_( 2250 )
- {
- std::cout <<" When application crashes .. i never get printed out " ;
- }
- private:
- Client_Mine& client_mine_;
- boost::thread thread_;
- string answer_;
- int sleep_int_;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement