[TD-2210] <fix>: use LWP pid. fix windows compile issue.
This commit is contained in:
parent
89c74b8a6c
commit
100db8ff0a
|
@ -4536,7 +4536,7 @@ void *superQueryProcess(void *sarg) {
|
|||
}
|
||||
selectAndGetResult(winfo->taos, g_queryInfo.superQueryInfo.sql[i], tmpFile);
|
||||
int64_t t2 = taosGetTimestampUs();
|
||||
printf("=[taosc] thread[%"PRId64"] complete one sql, Spent %f s\n", taosGetSelfPthreadId(), (t2 - t1)/1000000.0);
|
||||
printf("=[taosc] thread[%"PRId64"] complete one sql, Spent %f s\n", taosGetSelfPthreadId(), (t2 - t1)/1000000.0);
|
||||
} else {
|
||||
#ifdef TD_LOWA_CURL
|
||||
int64_t t1 = taosGetTimestampUs();
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "os.h"
|
||||
|
||||
|
|
|
@ -181,8 +181,8 @@ static void taosStopTcpThread(SThreadObj* pThreadObj) {
|
|||
return;
|
||||
}
|
||||
pThreadObj->stop = true;
|
||||
if (taosComparePthread(thread, taosGetSelfPthreadId())) {
|
||||
pthread_detach(taosGetSelfPthreadId());
|
||||
if (taosComparePthread(thread, pthread_self())) {
|
||||
pthread_detach(pthread_self());
|
||||
return;
|
||||
}
|
||||
pthread_join(thread, NULL);
|
||||
|
@ -207,8 +207,8 @@ void taosStopTcpServer(void *handle) {
|
|||
#endif
|
||||
}
|
||||
if (taosCheckPthreadValid(pServerObj->thread)) {
|
||||
if (taosComparePthread(pServerObj->thread, taosGetSelfPthreadId())) {
|
||||
pthread_detach(taosGetSelfPthreadId());
|
||||
if (taosComparePthread(pServerObj->thread, pthread_self())) {
|
||||
pthread_detach(pthread_self());
|
||||
} else {
|
||||
pthread_join(pServerObj->thread, NULL);
|
||||
}
|
||||
|
|
|
@ -327,8 +327,8 @@ static void syncStopPoolThread(SThreadObj *pThread) {
|
|||
return;
|
||||
}
|
||||
pThread->stop = true;
|
||||
if (taosComparePthread(thread, taosGetSelfPthreadId())) {
|
||||
pthread_detach(taosGetSelfPthreadId());
|
||||
if (taosComparePthread(thread, pthread_self())) {
|
||||
pthread_detach(pthread_self());
|
||||
return;
|
||||
}
|
||||
pthread_join(thread, NULL);
|
||||
|
|
Loading…
Reference in New Issue