Re: [Python-Dev] Autoloading? (Making Queue.Queue easier to use)
Skip write: Is the Queue class very useful outside a multithreaded context? The notion of a queue as a data structure has meaning outside of threaded applications. Its presence might seduce a new programmer into thinking it is subtly different than it really is. A cursory test suggests that it works, though q.get() on a empty queue seems a bit counterproductive. Also, Queue objects are probably quite a bit less efficient than lists. Taken as a whole, perhaps a stronger attachment with the threading module isn't such a bad idea.
Maybe Queue belongs in a module called synchronize to avoid any confusions. John M. Camara
Maybe Queue belongs in a module called synchronize to avoid any confusions.
Why not /just/ make the doc a little bit more explicit ? Instead of saying: It is especially useful in threads programming when information must be exchanged safely between multiple threads. Replace it with: It is dedicated to threads programming for safe exchange of information between multiple threads. On the other hand, if you are only looking for a single-thread queue structure, use the built-in list type, or the deque class from the collections module. If necessary, put it in bold ;)
participants (2)
-
Antoine Pitrou
-
john.m.camara@comcast.net