|
|
@ -105,11 +105,12 @@ namespace internal
|
|
|
|
return ret;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
disposed = false;
|
|
|
|
// we set to loop to true for thread to run.
|
|
|
|
// we set to loop to true for thread to run.
|
|
|
|
loop = true;
|
|
|
|
loop = true;
|
|
|
|
|
|
|
|
|
|
|
|
// wait for cid to ready, for parent thread to get the cid.
|
|
|
|
// wait for cid to ready, for parent thread to get the cid.
|
|
|
|
while (_cid < 0 && loop) {
|
|
|
|
while (_cid < 0) {
|
|
|
|
st_usleep(10 * 1000);
|
|
|
|
st_usleep(10 * 1000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -129,6 +130,8 @@ namespace internal
|
|
|
|
|
|
|
|
|
|
|
|
dispose();
|
|
|
|
dispose();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_cid = -1;
|
|
|
|
|
|
|
|
can_run = false;
|
|
|
|
tid = NULL;
|
|
|
|
tid = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|