Encapsulate logic of cluster and thread worker/pool (#116)