\begin{tikzpicture}
	\input{src/tikz/parallel}

	\begin{scope}[node distance=6mm]
		\begin{scope}[start chain=going below,every node/.style={on chain,join},parallel/arrow]
			\node[parallel/block] (input) {};
			\node[parallel/point] (fork) {};
			\node[parallel/task] (main) {\dots};
			\node[parallel/point] (join) {};
			\node[parallel/task] (select) {T\textsubscript{S}};
			\node[parallel/block] (output) {};
		\end{scope}

		\node[parallel/task,left=of main] (thread 0) {T\textsubscript{0}};
		\node[parallel/task,right=of main] (thread n) {T\textsubscript{n-1}};
	\end{scope}

	\begin{scope}[on background layer]
		\node[parallel/region=(thread 0)(main)(thread n)] {};
	\end{scope}

	\begin{scope}[parallel/arrow]
		\draw (fork) -| (thread 0) |- (join);
		\draw (fork) -| (thread n) |- (join);
	\end{scope}
\end{tikzpicture}
