
6 Jan
2010
6 Jan
'10
3:33 p.m.
xutm wrote:
class transStream { public: transStream() { cb = NULL; thrd = NULL; } ~transStream() { if (sock) {
The value of sock is undefined here, which might explain some problems you're having.
sock->close; // would be segment fault
Did you mean sock->close()?
if (thrd) { cout << "ready to delete the thread ..." << endl; //delete thrd; thrd->interrupt(); // actually, the thread still exists and runs
That's normal. You can't just stop threads, you can only request that it stops. The thread will be stopped when the next interruption point is reached. See the documentation about what interruption points are.