greenplumn IWorker 源码
greenplumn IWorker 代码
文件路径:/src/backend/gporca/libgpos/src/task/IWorker.cpp
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2008 Greenplum, Inc.
//
// @filename:
// CWorker.cpp
//
// @doc:
// Worker abstraction, e.g. thread
//---------------------------------------------------------------------------
#include "gpos/task/IWorker.h"
#include "gpos/memory/CMemoryPoolManager.h"
#include "gpos/task/CWorkerPoolManager.h"
using namespace gpos;
//---------------------------------------------------------------------------
// @function:
// IWorker::Self
//
// @doc:
// static function to lookup ones own worker in the pool manager
//
//---------------------------------------------------------------------------
IWorker *
IWorker::Self()
{
IWorker *worker = nullptr;
if (nullptr != CWorkerPoolManager::WorkerPoolManager())
{
worker = CWorkerPoolManager::WorkerPoolManager()->Self();
}
return worker;
}
//---------------------------------------------------------------------------
// @function:
// IWorker::CheckForAbort
//
// @doc:
// Check for aborts
//
//---------------------------------------------------------------------------
void
IWorker::CheckAbort(const CHAR *file, ULONG line_num)
{
IWorker *worker = Self();
if (nullptr != worker)
{
worker->CheckForAbort(file, line_num);
}
}
// EOF
相关信息
相关文章
greenplumn CAutoSuspendAbort 源码
greenplumn CTaskLocalStorage 源码
greenplumn CTaskSchedulerFifo 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦