Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #20738

Re: Should I acquire lock for logging.Handler.flush()?

From Fayaz Yusuf Khan <fayaz.yusuf.khan@gmail.com>
Subject Re: Should I acquire lock for logging.Handler.flush()?
Date 2012-02-23 23:25 +0530
References <mailman.26.1329809252.3037.python-list@python.org> <mailman.36.1329885907.3037.python-list@python.org> <fe9a3fd9-3f78-4f09-9fa6-7e67ddab7a41@w4g2000vbc.googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.82.1330019735.3037.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Thursday 23 Feb 2012 8:23:42 AM Vinay Sajip wrote:
> If locking is required in a particular handler class for close or
> flush, that can be implemented by the developer of that handler class.
> AFAIK there is no such need for the handler classes in the stdlib - if
> you have reason to believe otherwise, please give some examples of
> potential problems and with example code if possible.
Well, I'm not currently facing any race-around conditions. As I said, I was 
mostly familiarizing myself with the API.
Well, as emit() is always being called from within a lock, I assumed that 
flush() should/would also be handled similarly. Afterall, they are handling the 
same underlying output stream or in case of the BufferingHandler share the same 
buffer. Shouldn't the access be synchronized?
-- 
Fayaz Yusuf Khan
Cloud developer and architect
Dexetra SS, Bangalore, India
fayaz.yusuf.khan_AT_gmail_DOT_com
fayaz_AT_dexetra_DOT_com
+91-9746-830-823

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Should I acquire lock for logging.Handler.flush()? Fayaz Yusuf Khan <fayaz.yusuf.khan@gmail.com> - 2012-02-21 12:53 +0530
  Re: Should I acquire lock for logging.Handler.flush()? Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2012-02-21 12:52 -0800
    Re: Should I acquire lock for logging.Handler.flush()? Fayaz Yusuf Khan <fayaz.yusuf.khan@gmail.com> - 2012-02-22 10:14 +0530
      Re: Should I acquire lock for logging.Handler.flush()? Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2012-02-23 08:23 -0800
        Re: Should I acquire lock for logging.Handler.flush()? Fayaz Yusuf Khan <fayaz.yusuf.khan@gmail.com> - 2012-02-23 23:25 +0530
          Re: Should I acquire lock for logging.Handler.flush()? Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2012-02-23 11:08 -0800
          Re: Should I acquire lock for logging.Handler.flush()? Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2012-02-23 12:06 -0800

csiph-web