Make threading contollable by an env var