The tensor product of semilocal algebras