Rafael Zanella added the comment: @gutworth: Since one of the main uses of Queue is with threads, I think it *really* should acquire the mutex before changing the maxsize;
@amaury.forgeotdarc: Your patch makes the point of allowing the size to be changed at some other place (e.g.: an attribute of an instance passed as the maxsize), but as stated above I think (am not an expert) the mutex really should be held before the maxsize change, another point: using an instance on your patch a call to Queue.maxsize would return something like: """ Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> class C: ... def __init(self): self.n = 1; ... def __int__(self): return int(self.n); ... >>> c = C() >>> import Queue >>> q = Queue.Queue(c) >>> q.maxsize <__main__.C instance at 0xb7c341ac> >>> """ wich would force to have a get() to the maxsize attribute; I have added a diff; Added file: http://bugs.python.org/file9478/queue_maxsize_3.diff __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2149> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com