add pthread learning codes