% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/makeClusterPSOCK.R
\name{autoStopCluster}
\alias{autoStopCluster}
\title{Automatically stop a cluster when garbage collected}
\usage{
autoStopCluster(cl, debug = FALSE)
}
\arguments{
\item{cl}{A cluster object}

\item{debug}{If TRUE, then debug messages are produced when
the cluster is garbage collected.}
}
\value{
The cluster object with attribute \code{gcMe} set.
}
\description{
Registers a finalizer to a cluster such that the cluster will
be stopped when garbage collected
}
\seealso{
The cluster is stopped using
\code{\link[parallel:makeCluster]{stopCluster}(cl)}.
}
\keyword{internal}
