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, during the compilation and before execution of the source code, a plurality of access control mechanisms for managing access to the plurality of shared resources, wherein the plurality of access control mechanisms include both a first access control mechanism for managing access to a first one of the plurality of shared resources, and a second access control mechanism for managing access to a second one of the plurality of shared resources, wherein the second access control mechanism is different from the first access control mechanism; 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, during the compilation, 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; determining whether the shared resource acquisition pattern differs from the shared resource release pattern beyond a predetermined threshold; and generating, during the compilation, an alert if the predetermined threshold is exceeded.