% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/threads.R
\name{check_thread_count}
\alias{check_thread_count}
\title{Check that the required threads are available}
\usage{
check_thread_count(
  n_threads,
  avail_threads = availableCores(),
  opt_set = FALSE
)
}
\arguments{
\item{n_threads}{The number of threads to check availability for}

\item{avail_threads}{The number of threads that are available on the system.
Defaults to \code{parallelly::availableCores()}}

\item{opt_set}{Whether the \code{iscream.threads} options is set}
}
\value{
\code{n_threads} if the requested number of threads are available and
stops if not
}
\description{
Check that the required threads are available
}
\keyword{internal}
