[issue24645] logging.handlers.QueueHandler should not lock when handling a record

2015-07-25 Thread Vinay Sajip
Changes by Vinay Sajip : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue24645] logging.handlers.QueueHandler should not lock when handling a record

2015-07-16 Thread Vinay Sajip
Vinay Sajip added the comment: I agree the lock could be seen as redundant as there are no shared data structures used by the current implementation of the enqueue and prepare methods (which are called after the lock is acquired), but users could potentially override those methods in subclasse

[issue24645] logging.handlers.QueueHandler should not lock when handling a record

2015-07-16 Thread Justin Bronder
Justin Bronder added the comment: On 16/07/15 23:21 +, Vinay Sajip wrote: > > Vinay Sajip added the comment: > > I'm not sure I want to make a special case just to support what seems like a > somewhat pathological use case (no offence intended). > > If you need this, there's no reason you

[issue24645] logging.handlers.QueueHandler should not lock when handling a record

2015-07-16 Thread Vinay Sajip
Vinay Sajip added the comment: I'm not sure I want to make a special case just to support what seems like a somewhat pathological use case (no offence intended). If you need this, there's no reason you couldn't subclass QueueHandler and override handle(), is there? -- ___

[issue24645] logging.handlers.QueueHandler should not lock when handling a record

2015-07-16 Thread R. David Murray
R. David Murray added the comment: I can't see doing io in __repr__ ever making sense, so I'm not sure this is a use case we care about. But Vinay might not have any objection to removing locking if it is redundant, so we'll see what he has to say. --

[issue24645] logging.handlers.QueueHandler should not lock when handling a record

2015-07-16 Thread Justin Bronder
Justin Bronder added the comment: On 16/07/15 20:03 +, R. David Murray wrote: > > R. David Murray added the comment: > > Can you expand on the deadlock? Are you saying that the "extra" locking is > causing the deadlock? > > -- > nosy: +r.david.murray, vinay.sajip > versions: -Py

[issue24645] logging.handlers.QueueHandler should not lock when handling a record

2015-07-16 Thread R. David Murray
R. David Murray added the comment: Can you expand on the deadlock? Are you saying that the "extra" locking is causing the deadlock? -- nosy: +r.david.murray, vinay.sajip versions: -Python 3.2, Python 3.3 ___ Python tracker

[issue24645] logging.handlers.QueueHandler should not lock when handling a record

2015-07-16 Thread Justin Bronder
New submission from Justin Bronder: The Queue backing the QueueHandler is already sufficiently locking for thread-safety. This isn't a huge issue, but the QueueHandler is a very nice built-in which could be used to work around a deadlock I've encountered several times. In brief, functions wh