En Tue, 30 Dec 2008 06:16:23 -0200, k3xji escribió:
As GLOBAL_LOOP_COUNT is 1000, now this is making a bottleneck on
the readers. I had assumed that as everythread is given only 100
bytecodes to execute, that it will be enough to have a 1 value for
this number to let other rthread start
> >> Note that the thread acquires the lock ONCE, repeats several thousand
> >> times an assignment to a *local* variable called GLOBAL_VAR (!), finally
> >> releases the lock and exits. As every thread does the same, they just
> >> run
> >> one after another, they never have a significant overl
> >> Note that the thread acquires the lock ONCE, repeats several thousand
> >> times an assignment to a *local* variable called GLOBAL_VAR (!), finally
> >> releases the lock and exits. As every thread does the same, they just
> >> run
> >> one after another, they never have a significant overl
En Mon, 29 Dec 2008 08:17:42 -0200, k3xji escribió:
On 29 Aralık, 11:52, "Gabriel Genellina"
wrote:
En Mon, 29 Dec 2008 05:56:10 -0200, k3xji escribió:
> I am trying to see on which situations does the Read-Write Lock
> performs better on primitive Lock() itself. Below is the code I am
> u
On Dec 29, 4:17 am, k3xji wrote:
> On 29 Aralýk, 11:52, "Gabriel Genellina"
> wrote:
>
> > En Mon, 29 Dec 2008 05:56:10 -0200, k3xji escribió:
>
snip
> > > class wthread(threading.Thread):
> > > def run(self):
> > > try:
> > > #GLOBAL_LOCK.acquireWrite()
> > >
On 29 Aralık, 11:52, "Gabriel Genellina"
wrote:
> En Mon, 29 Dec 2008 05:56:10 -0200, k3xji escribió:
>
> > I am trying to see on which situations does the Read-Write Lock
> > performs better on primitive Lock() itself. Below is the code I am
> > using to test the performance:
> > import threadi
En Mon, 29 Dec 2008 05:56:10 -0200, k3xji escribió:
I am trying to see on which situations does the Read-Write Lock
performs better on primitive Lock() itself. Below is the code I am
using to test the performance:
import threading
import locks
import time
class mylock(object):
(I'm not conv
Hi,
I am trying to see on which situations does the Read-Write Lock
performs better on primitive Lock() itself. Below is the code I am
using to test the performance:
import threading
import locks
import time
class mylock(object):
def __init__(self):
self.__notreading = threading.Even