Sry if it sounds like nit picking(it probably is :)), could we standardize on either using closing brackets on separate lines or not? This feels a lot like java/c++ where you have to use curly braces to denote the lock end.

P.S. only nitpicking on this is a pep8 related pr