greenplumn CAutoSuspendAbort 源码

  • 2022-08-18
  • 浏览 (260)

greenplumn CAutoSuspendAbort 代码

文件路径:/src/backend/gporca/libgpos/src/task/CAutoSuspendAbort.cpp

//---------------------------------------------------------------------------
//	Greenplum Database
//	Copyright (C) 2011 EMC Corp.
//
//	@filename:
//		CAutoSuspendAbort.cpp
//
//	@doc:
//		Auto suspend abort object
//---------------------------------------------------------------------------

#include "gpos/task/CAutoSuspendAbort.h"

#include <stddef.h>

#include "gpos/base.h"
#include "gpos/task/CTask.h"

using namespace gpos;

//---------------------------------------------------------------------------
//	@function:
//		CAutoSuspendAbort::CAutoSuspendAbort
//
//	@doc:
//		ctor
//
//---------------------------------------------------------------------------
CAutoSuspendAbort::CAutoSuspendAbort()
{
	m_task = CTask::Self();

	if (nullptr != m_task)
	{
		m_task->SuspendAbort();
	}
}


//---------------------------------------------------------------------------
//	@function:
//		CAutoSuspendAbort::~CAutoSuspendAbort
//
//	@doc:
//		dtor
//
//---------------------------------------------------------------------------
CAutoSuspendAbort::~CAutoSuspendAbort()
{
	if (nullptr != m_task)
	{
		m_task->ResumeAbort();
	}
}


// EOF

相关信息

greenplumn 源码目录

相关文章

greenplumn CAutoTaskProxy 源码

greenplumn CAutoTraceFlag 源码

greenplumn CTask 源码

greenplumn CTaskContext 源码

greenplumn CTaskLocalStorage 源码

greenplumn CTaskSchedulerFifo 源码

greenplumn CWorker 源码

greenplumn CWorkerPoolManager 源码

greenplumn ITask 源码

greenplumn IWorker 源码

0  赞