1. A computer-implemented method for ensuring, during compilation, that a body of multi-threaded application source code is not susceptible to deadlock, the method comprising: identifying a plurality of shared resources within the body of multi-threaded application source code; identifying a plurality of access control mechanisms for managing access to the plurality of shared resources; tracking, on a detection of an object entering scope, one or more invocations of the plurality of access control mechanisms, yielding a shared resource acquisition pattern; tracking, on a detection of the object leaving scope, one or more invocations of the plurality of access control mechanisms, yielding a shared resource release pattern; and generating an alert when the shared resource acquisition pattern differs, beyond a predetermined threshold, from the shared resource release pattern.