Let $D$ be an open set in euclidean space ${\bb R}^m$ with non-empty boundary $\partial D$, and let $p_D : D \times D \times; [0,\infty)) \longrightarrow {\bb R}$ be the Dirichlet heat kernel for the parabolic operator ${-}\Delta + \partial/\partial t$, where ${-}\Delta$ is the Dirichlet laplacian on $L^2(D)$. Since the Dirichlet heat kernel is non-negative, we may define the (open) set function\renewcommand{\theequation}{1.1}\begin{equation}P_D = \int\nolimits^{\infty}_0 \int\nolimits_D \int\nolimits_D p_D (x,y;t)\,dx\,dy\,dt.\end{equation}We say that $D$ has finite torsional rigidity if $P_D < \infty$. It is well known that if $D$ has finite volume, then $D$ has finite torsional rigidity [11]. As we shall see, the converse is not true. The main purpose of this paper is to obtain necessary and sufficient conditions on the geometry of $D$ to guarantee finite torsional rigidity and to gain some understanding of the behaviour of the expected lifetime of brownian motion in a certain natural class of domains that do not have finite torsional rigidity.