How to solve a deadlock in an orthodox way

2020-03-04 Thread Pau Freixes
Hi folks, During the development of a Python library which uses under the hood a C++ library - using Cyhton - we found a deadlock issue between a lock maintained by the C++ library and the GIL lock. The problem started to appear at the moment that we tried to offload all IO operations into an iso

Different execution time in python code between embedded or standalone

2008-06-03 Thread Pau Freixes
ded mode md5challenge reached about 200.000 more keys !!! I repeat this test many times and always wins embedded mode !!! What's happen ? Also I tested to erase read dependencies from /dev/random, and calculate all keys from same buffer. In this case embedded mode win always also, and the d

Re: Different execution time in python code between embedded or standalone

2008-06-04 Thread Pau Freixes
licit - the const_b is 20 bytes. My problem it's that don't understand because the same program run into embedded mode or in bash mode have a different results !!! what do you think about this ? may be a GIL ? PD: no seguro que no llego :), a ver si alguien mas se apunta a la discusion !

Re: Different execution time in python code between embedded or standalone

2008-06-08 Thread Pau Freixes
led launch some threads this interpreter will be prepare for handle more one thread with python thread safe environment, can everybody help me ? Thks On Tue, Jun 3, 2008 at 9:58 PM, Pau Freixes <[EMAIL PROTECTED]> wrote: > Hi list, > > First Hello to all, this is my and hope not end m

GIL cpu multi core usage problem

2008-06-09 Thread Pau Freixes
icle for my blog and I need to make sure about the current problem with GIL and multi core environments, this picture try to explain with images the problem for scheduling multiple threads running python code of same interpreter into multiple cpu cores. Can anyone confirm to me this picture ?

Re: GIL cpu multi core usage problem

2008-06-13 Thread Pau Freixes
on, 09 Jun 2008 15:26:09 -0300, Pau Freixes <[EMAIL PROTECTED]> > escribió: > > Surly this is a recurring theme into python dev world, but I need your >> help >> for confirm if the follow image it's really >> >> http://www.milnou.net/~pfreixes

Python internals paper or book

2008-06-13 Thread Pau Freixes
management : object references, allocation, garbage collector my question it's exists some paper or book with this themes ? * Credits : it's a quantitative value related with hours in Spanish universities. Thks -- Pau Freixes Linux GNU/User -- http://mail.python.org/mailman/listinfo/python-list

Re: please critique my thread code

2008-06-15 Thread Pau Freixes
ime. >dir = start_time.replace(" ", "_").replace(":", "_") >os.mkdir(dir) >os.chdir(dir) > >queue = Queue.Queue(0) > >for i in xrange(32): >t = threading.Thread(target=worker, name="worker %d" % (i + > 1)) >t.setDaemon(True) >t.start() > >for id in xrange(start_id, end_id + 1): >queue.put(id) > ># When the queue has size zero, exit in three seconds. >while True: >if queue.qsize() == 0: >time.sleep(3) >break > >print now() > -- > http://mail.python.org/mailman/listinfo/python-list > -- Pau Freixes Linux GNU/User -- http://mail.python.org/mailman/listinfo/python-list

Re: please critique my thread code

2008-06-19 Thread Pau Freixes
- and may be that this week up suspicion to the admin. May be, you can use httplib [1] for do a persistent connection and reuse same connection for same thread. [1] http://www.python.org/doc/2.4.2/lib/httplib-examples.html -- Pau Freixes Linux GNU/User -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] C API for gc.enable() and gc.disable()

2008-06-19 Thread Pau Freixes
EMAIL PROTECTED] > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > http://mail.python.org/mailman/options/python-dev/pfreixes%40gmail.com > -- Pau Freixes Linux GNU/User -- http://mail.python.org/mailman/listinfo/python-list

Re: Google-like "Did you mean... ?" search algorithm

2008-06-19 Thread Pau Freixes
implement > search suggestions, similar to Google's "Did you mean... ?" feature. > Can anyone point me to web pages, journal articles, implementations > (preferably in Python!), or any other resources in this area? > > Thanks! > -- > http://mail.python.org/mailman/li

mod_wsgi vs mod_python interfaces

2008-06-21 Thread Pau Freixes
ify a different performance. Or WSGI interface it's more efficient than mod_python interface ? What do you think about this ? -- Pau Freixes Linux GNU/User -- http://mail.python.org/mailman/listinfo/python-list

Re: Threads, GIL and re.match() performance

2008-06-26 Thread Pau Freixes
t;get more performance? > > -- > http://mail.python.org/mailman/listinfo/python-list > -- Pau Freixes Linux GNU/User -- http://mail.python.org/mailman/listinfo/python-list

Re: Threads, GIL and re.match() performance

2008-06-26 Thread Pau Freixes
, Matthieu Brucher < [EMAIL PROTECTED]> wrote: > Hi, > > The C-API uses references counts as well, so it is not threadsafe. > > Matthieu > > 2008/6/26 Pau Freixes <[EMAIL PROTECTED]>: > > But Python C-API[1] it's the main base for extent python with C/c++,

Re: Embedding Python

2008-07-01 Thread Pau Freixes
> > 33 mainobj = PyImport_ExecCodeModule("multiply", (PyObject > *) python_code); > (gdb) n > > Program received signal SIGSEGV, Segmentation fault. > 0x0804e7f6 in PyImport_ExecCodeModuleEx () > > The .pyc file woks just fine in Python interpreter: &g

Re: Micro-threading PEP proposal announcement

2008-08-26 Thread Pau Freixes
assume that it's not solving a real problem and will let it > quietly die on the vine... > > Thank you for your attention! > > -bruce > -- > http://mail.python.org/mailman/listinfo/python-list > -- Pau Freixes Linux GNU/User -- http://mail.python.org/mailman/listinfo/python-list

Best way for add new path when embedding python into C

2008-09-01 Thread Pau Freixes
ject ? Bye and thks to all -- Pau Freixes Linux GNU/User -- http://mail.python.org/mailman/listinfo/python-list