asyncio with map&reduce flavor and without flooding the event loop

2014-08-03 Thread Valery Khamenya
ia a Task on some worker, not just spawned implicitly and unmanaged! It would be cool to find asyncio gurus interested in this very natural goal. Your help and ideas would be very much appreciated. best regards -- Valery -- https://mail.python.org/mailman/listinfo/python-list

Re: Anything better than asyncio.as_completed() and asyncio.wait() to manage execution of large amount of tasks?

2014-07-20 Thread Valery Khamenya
ith_max_workers(tasks, *, loop=None, max_workers=5, timeout=None): loop = loop if loop is not None else asyncio.get_event_loop() workers = [] pending = set() done = asyncio.Queue(maxsize=max_workers, loop=loop) # Valery: respect the "loop" parameter exhausted = False

Anything better than asyncio.as_completed() and asyncio.wait() to manage execution of large amount of tasks?

2014-07-15 Thread Valery Khamenya
them all at once, but to instantiate and to address them one by one as the running tasks are completed. best regards -- Valery -- https://mail.python.org/mailman/listinfo/python-list

Re: How to initialize each multithreading Pool worker with an individual value?

2010-12-02 Thread Valery
a shared resource. P.S. sorry, I found your answer only now. reagrds -- Valery -- http://mail.python.org/mailman/listinfo/python-list

Re: How to initialize each multithreading Pool worker with an individual value?

2010-12-01 Thread Valery Khamenya
ommunication is done. In contrast, your case looks for me that you rather propose to initiate the connection each time a new job comes from queue for an execution. Regards, Valery -- http://mail.python.org/mailman/listinfo/python-list

How to initialize each multithreading Pool worker with an individual value?

2010-11-30 Thread Valery Khamenya
t "sending data over port # %s" % port if __name__ == "__main__": ports=((4001,4002, 4003), ) p = Pool(3, port_initializer, ports) # oops... :-) some_data_to_send = range(20) p.map(use_connection, some_data_to_send) best regards -- Valery A.Khamenya -- http

Re: a huge shared read-only data in parallel accesses -- How? multithreading? multiprocessing?

2009-12-26 Thread Valery
on maps then you have a tiny effort to convert your code into a MULTIprocessing one :) just that. Kind regards. Valery -- http://mail.python.org/mailman/listinfo/python-list

Re: a huge shared read-only data in parallel accesses -- How? multithreading? multiprocessing?

2009-12-10 Thread Valery
u know, what I mentioned > here:http://groups.google.com/group/unladen-swallow/browse_thread/thread/9... > ) yes, I've understood the idea explained by you there. regards, Valery -- http://mail.python.org/mailman/listinfo/python-list

a huge shared read-only data in parallel accesses -- How? multithreading? multiprocessing?

2009-12-09 Thread Valery
(f, xrange(10))) # switch to ps and see how fast your free memory is getting wasted... print res ## Kind regards Valery -- http://mail.python.org/mailman/listinfo/python-list

Re: "from logging import *" causes an error under Ubuntu Karmic

2009-10-04 Thread Valery
OK, I've filed a bug. Because Python2.5 works fine here. -- Valery -- http://mail.python.org/mailman/listinfo/python-list

"from logging import *" causes an error under Ubuntu Karmic

2009-10-04 Thread Valery
ck (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute 'NullHandler' $ uname -a Linux vaktop 2.6.31-11-generic #38-Ubuntu SMP Fri Oct 2 11:55:55 UTC 2009 i686 GNU/Linux -- regards Valery -- http://mail.python.org/mailman/listinfo/python-list

multiprocessing + console + windows = challenge?

2009-09-26 Thread Valery
ws :-/ regards Valery -- http://mail.python.org/mailman/listinfo/python-list

Problem: neither urllib2.quote nor urllib.quote encode the unicode strings arguments

2008-10-03 Thread Valery Khamenya
Hi all things like urllib.quote(u"пиво Müller ") fail with error message: : u'\u043f' Similarly with urllib2. Anyone got a hint?? I need it to form the URI containing non-ascii chars. thanks in advance, best regards -- Valery -- http://mail.python.org/mailman/listinfo/python-list

SOCKS5 + python = pain in you-know-where ?

2007-08-30 Thread Valery
Hi all just googled both the web and groups. Who could believe in that: nothing simple, helpful and working concerning SOCKS5 support in python. Anyone got success here? Regards, Valery. -- http://mail.python.org/mailman/listinfo/python-list