private function get_first_transaction(&$transactions, $parallel) {
		foreach ($transactions as $key => $transaction) {
			if ($transaction->parallel == $parallel) {
				unset($transactions[$key]);
				$transaction->lock_transaction();
				return $transaction;
			}
		}
		return null;
	}