Re: Please help with Threading
It is pretty cool although it looks like a recursive function at first ;)
On 20 May 2013 10:13, "Chris Angelico" <email@example.com> wrote:
> On Mon, May 20, 2013 at 6:35 PM, Cameron Simpson <firstname.lastname@example.org> wrote:
> > _lock = Lock()
> > def lprint(*a, **kw):
> > global _lock
> > with _lock:
> > print(*a, **kw)
> > and use lprint() everywhere?
> Fun little hack:
> def print(*args,print=print,lock=Lock(),**kwargs):
> with lock:
> Question: Is this a cool use or a horrible abuse of the scoping rules?
|All times are GMT. The time now is 02:26 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.