Synchronized decorator and with context for objects, functions, and methods