ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
ExternalToolTimeLimit Class Reference

Scope within which an external tool is given a time limit. More...

#include "external_tool.h"

Public Member Functions

 ExternalToolTimeLimit (double ms)
 ~ExternalToolTimeLimit ()
 ExternalToolTimeLimit (const ExternalToolTimeLimit &)=delete
ExternalToolTimeLimit & operator= (const ExternalToolTimeLimit &)=delete

Private Attributes

double saved_
 Limit of the enclosing scope, restored on exit.

Detailed Description

Scope within which an external tool is given a time limit.

While an object of this class is alive, run_external_tool kills a tool (its whole process group, as on a cancel) that has run for more than the given time, and throws ExternalToolTimeout. The cost-based chooser of the probability methods uses it to hold an external compiler to the cost of the method it was preferred over; a tool run outside any such scope has no limit other than statement_timeout.

Definition at line 87 of file external_tool.h.

Constructor & Destructor Documentation

◆ ExternalToolTimeLimit() [1/2]

ExternalToolTimeLimit::ExternalToolTimeLimit ( double ms)
explicit
Parameters
msTime limit in milliseconds; 0 or less for no limit.

Definition at line 73 of file external_tool.cpp.

Here is the caller graph for this function:

◆ ~ExternalToolTimeLimit()

ExternalToolTimeLimit::~ExternalToolTimeLimit ( )

Definition at line 79 of file external_tool.cpp.

◆ ExternalToolTimeLimit() [2/2]

ExternalToolTimeLimit::ExternalToolTimeLimit ( const ExternalToolTimeLimit & )
delete
Here is the call graph for this function:

Member Function Documentation

◆ operator=()

ExternalToolTimeLimit & ExternalToolTimeLimit::operator= ( const ExternalToolTimeLimit & )
delete
Here is the call graph for this function:

Member Data Documentation

◆ saved_

double ExternalToolTimeLimit::saved_
private

Limit of the enclosing scope, restored on exit.

Definition at line 95 of file external_tool.h.


The documentation for this class was generated from the following files: