A Lock structure with timeout and stack traces in case of deadlock