[Twisted-Python] daemon thread support
Bob Ippolito
bob at redivi.com
Tue Dec 2 20:58:05 MST 2003
On Dec 2, 2003, at 10:10 PM, Andrew Bennetts wrote:
> On Tue, Dec 02, 2003 at 09:46:20PM -0500, Bob Ippolito wrote:
>>
>> On Dec 2, 2003, at 9:15 PM, Jp Calderone wrote:
>>
>>> This makes using threads far, far too easy. Luckily for everyone,
>>> on a
>>> second reading, I don't think these will work. imap needs something
>>> to
>>> iterate the object it returns. Both of the above solutions will
>>> simply
>>> create an itertools.imap object and then do nothing with it :)
>>
>> What about list as the function, and itertools.imap as the argument to
>> that function?
>
> Or maybe sets.Set? So long as process always returns the same value
> (probably None), this won't eat memory the way list would...
sets.Set eats more memory than list does (it's a python class that uses
a dict for storage).. if you don't want to return anything useful
there's always reduce(lambda a,b:None, iterable)
-bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2357 bytes
Desc: not available
URL: </pipermail/twisted-python/attachments/20031202/607ec0e3/attachment-0002.bin>
More information about the Twisted-Python
mailing list