Apache Mesos
Classes | Functions | Variables
process::internal Namespace Reference

Classes

class  CollectProcess
 
class  AwaitProcess
 
struct  Dispatch
 
struct  Dispatch< void >
 
struct  Dispatch< Future< R > >
 
struct  wrap
 
struct  unwrap
 
struct  wrap< Future< X > >
 
struct  unwrap< Future< X > >
 
class  Loop
 
class  ReaperProcess
 
class  ThunkProcess
 
class  JobObjectManager
 

Functions

void dispatch (const UPID &pid, std::unique_ptr< lambda::CallableOnce< void(ProcessBase *)>> f, const Option< const std::type_info * > &functionType=None())
 
template<typename C , typename... Arguments>
void run (std::vector< C > &&callbacks, Arguments &&...arguments)
 
template<typename U >
void discarded (Future< U > future)
 
template<typename T >
void discard (WeakFuture< T > reference)
 
template<typename T >
void discarded (Future< T > future)
 
template<typename T >
void select (const Future< T > &future, std::shared_ptr< Promise< Future< T >>> promise)
 
void awaited (Owned< Latch > latch)
 
template<typename T , typename X >
void thenf (lambda::CallableOnce< Future< X >(const T &)> &&f, std::unique_ptr< Promise< X >> promise, const Future< T > &future)
 
template<typename T , typename X >
void then (lambda::CallableOnce< X(const T &)> &&f, std::unique_ptr< Promise< X >> promise, const Future< T > &future)
 
template<typename T >
void repair (lambda::CallableOnce< Future< T >(const Future< T > &)> &&f, std::unique_ptr< Promise< T >> promise, const Future< T > &future)
 
template<typename T >
void expired (const std::shared_ptr< lambda::CallableOnce< Future< T >(const Future< T > &)>> &f, const std::shared_ptr< Latch > &latch, const std::shared_ptr< Promise< T >> &promise, const std::shared_ptr< Option< Timer >> &timer, const Future< T > &future)
 
template<typename T >
void after (const std::shared_ptr< Latch > &latch, const std::shared_ptr< Promise< T >> &promise, const std::shared_ptr< Option< Timer >> &timer, const Future< T > &future)
 
template<typename T >
bool await (const process::Future< T > &future, const Duration &duration)
 
pid_t defaultClone (const lambda::function< int()> &func)
 
Try< Nothingcloexec (const InputFileDescriptors &stdinfds, const OutputFileDescriptors &stdoutfds, const OutputFileDescriptors &stderrfds)
 
int childMain (const std::string &path, char **argv, char **envp, const InputFileDescriptors &stdinfds, const OutputFileDescriptors &stdoutfds, const OutputFileDescriptors &stderrfds, bool blocking, int pipes[2], const std::vector< Subprocess::ChildHook > &child_hooks)
 
Try< pid_tcloneChild (const std::string &path, std::vector< std::string > argv, const Option< std::map< std::string, std::string >> &environment, const Option< lambda::function< pid_t(const lambda::function< int()> &)>> &_clone, const std::vector< Subprocess::ParentHook > &parent_hooks, const std::vector< Subprocess::ChildHook > &child_hooks, const InputFileDescriptors stdinfds, const OutputFileDescriptors stdoutfds, const OutputFileDescriptors stderrfds)
 
Try
<::internal::windows::ProcessData
createChildProcess (const std::string &path, const std::vector< std::string > &argv, const Option< std::map< std::string, std::string >> &environment, const std::vector< Subprocess::ParentHook > &parent_hooks, const InputFileDescriptors stdinfds, const OutputFileDescriptors stdoutfds, const OutputFileDescriptors stderrfds)
 

Variables

PID< ReaperProcessreaper
 
PID< JobObjectManagerjob_object_manager
 

Function Documentation

template<typename T >
void process::internal::after ( const std::shared_ptr< Latch > &  latch,
const std::shared_ptr< Promise< T >> &  promise,
const std::shared_ptr< Option< Timer >> &  timer,
const Future< T > &  future 
)
template<typename T >
bool process::internal::await ( const process::Future< T > &  future,
const Duration duration 
)
void process::internal::awaited ( Owned< Latch >  latch)
inline
int process::internal::childMain ( const std::string &  path,
char **  argv,
char **  envp,
const InputFileDescriptors &  stdinfds,
const OutputFileDescriptors &  stdoutfds,
const OutputFileDescriptors &  stderrfds,
bool  blocking,
int  pipes[2],
const std::vector< Subprocess::ChildHook > &  child_hooks 
)
inline
Try<Nothing> process::internal::cloexec ( const InputFileDescriptors &  stdinfds,
const OutputFileDescriptors &  stdoutfds,
const OutputFileDescriptors &  stderrfds 
)
inline
Try<pid_t> process::internal::cloneChild ( const std::string &  path,
std::vector< std::string >  argv,
const Option< std::map< std::string, std::string >> &  environment,
const Option< lambda::function< pid_t(const lambda::function< int()> &)>> &  _clone,
const std::vector< Subprocess::ParentHook > &  parent_hooks,
const std::vector< Subprocess::ChildHook > &  child_hooks,
const InputFileDescriptors  stdinfds,
const OutputFileDescriptors  stdoutfds,
const OutputFileDescriptors  stderrfds 
)
inline
Try<::internal::windows::ProcessData> process::internal::createChildProcess ( const std::string &  path,
const std::vector< std::string > &  argv,
const Option< std::map< std::string, std::string >> &  environment,
const std::vector< Subprocess::ParentHook > &  parent_hooks,
const InputFileDescriptors  stdinfds,
const OutputFileDescriptors  stdoutfds,
const OutputFileDescriptors  stderrfds 
)
inline
pid_t process::internal::defaultClone ( const lambda::function< int()> &  func)
inline
template<typename T >
void process::internal::discard ( WeakFuture< T >  reference)
template<typename U >
void process::internal::discarded ( Future< U >  future)
template<typename T >
void process::internal::discarded ( Future< T >  future)
void process::internal::dispatch ( const UPID &  pid,
std::unique_ptr< lambda::CallableOnce< void(ProcessBase *)>>  f,
const Option< const std::type_info * > &  functionType = None() 
)
template<typename T >
void process::internal::expired ( const std::shared_ptr< lambda::CallableOnce< Future< T >(const Future< T > &)>> &  f,
const std::shared_ptr< Latch > &  latch,
const std::shared_ptr< Promise< T >> &  promise,
const std::shared_ptr< Option< Timer >> &  timer,
const Future< T > &  future 
)
template<typename T >
void process::internal::repair ( lambda::CallableOnce< Future< T >(const Future< T > &)> &&  f,
std::unique_ptr< Promise< T >>  promise,
const Future< T > &  future 
)
template<typename C , typename... Arguments>
void process::internal::run ( std::vector< C > &&  callbacks,
Arguments &&...  arguments 
)
template<typename T >
void process::internal::select ( const Future< T > &  future,
std::shared_ptr< Promise< Future< T >>>  promise 
)
template<typename T , typename X >
void process::internal::then ( lambda::CallableOnce< X(const T &)> &&  f,
std::unique_ptr< Promise< X >>  promise,
const Future< T > &  future 
)
template<typename T , typename X >
void process::internal::thenf ( lambda::CallableOnce< Future< X >(const T &)> &&  f,
std::unique_ptr< Promise< X >>  promise,
const Future< T > &  future 
)

Variable Documentation

PID<JobObjectManager> process::internal::job_object_manager
PID<ReaperProcess> process::internal::reaper