Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-12 Thread Morten W. Petersen
[Erik Enge] | Forget it. My fault. *shame, shame* *chuckle* :-) -Morten ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/m

Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-12 Thread Erik Enge
[Erik Enge] | On every view - a call to index_html() - it prints '{}' to stdout. Bug? Forget it. My fault. *shame, shame* ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encodin

Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-12 Thread Erik Enge
[Morten W. Petersen] | There's a new product available, which enables unique ids in a given context, | take a look at http://www.zope.org/Members/morphex/ThreadSafeCounter>. On every view - a call to index_html() - it prints '{}' to stdout. Bug? ___

Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-12 Thread Martijn Pieters
On Mon, Feb 12, 2001 at 02:27:24PM +, Toby Dickenson wrote: > On Mon, 12 Feb 2001 10:27:02 +0100, Martijn Pieters <[EMAIL PROTECTED]> > wrote: > > >The ZODB will invalidate and force a retry on one of the connections. > >Chris's code is threadsafe and will result in unique, sequential values.

Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-12 Thread Toby Dickenson
On Mon, 12 Feb 2001 10:27:02 +0100, Martijn Pieters <[EMAIL PROTECTED]> wrote: >The ZODB will invalidate and force a retry on one of the connections. >Chris's code is threadsafe and will result in unique, sequential values. ** Unless

Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-12 Thread Morten W. Petersen
[Wolfgang Strobl] | Well, yes. I wouldn't have expected that kind of platform | dependendy in products like AddressBook, though. Anyways, I'm looking into ways of making the threadsafe counter platform independent. Cheers, Morten ___ Zope-Dev maill

Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-12 Thread Wolfgang Strobl
On 12 Feb 2001, 12:01 Morten W. Petersen wrote: > [Wolfgang Strobl] > > | Doesn't even install on Windows, because it imports and uses fcntl. > | | >From the fcntl docs: "Availability: Unix". > > Well, the download page says "Platform: Generic UNIX-like", doesn't > it? Well, yes. I wouldn't h

Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-12 Thread Morten W. Petersen
[Wolfgang Strobl] | Doesn't even install on Windows, because it imports and uses fcntl. | | >From the fcntl docs: "Availability: Unix". Well, the download page says "Platform: Generic UNIX-like", doesn't it? -Morten ___ Zope-Dev maillist - [EMAIL

Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-12 Thread Wolfgang Strobl
On 10 Feb 2001, 13:01 Morten W. Petersen wrote: > There's a new product available, which enables unique ids in a given > context, take a look at > http://www.zope.org/Members/morphex/ThreadSafeCounter>. Doesn't even install on Windows, because it imports and uses fcntl. >From the fcntl docs: "

Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-12 Thread Martijn Pieters
On Mon, Feb 12, 2001 at 01:31:04AM +0100, Morten W. Petersen wrote: > As I've understood it, two threads serving requests have a copy each of the > database, and only when changes are committed are they reflected in > the database. Therefore, two requests created at the same time could > get an i

Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-12 Thread Morten W. Petersen
[Steve Alexander] | I'd thought the original point of ThreadSafeCounter was to provide | a simple sequential unique values generator, without causing | writes to the Data.fs. Yes, that was the original intent. But having one that's safe over multiple ZEO clients is a Very Good Thing (tm). :-)

Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-12 Thread Steve Alexander
Morten W. Petersen wrote: > [Erik Enge] > > | What happens if you run this with ZEO? Will the file be kept «in > | sync» with all ZEO Clients? > > Good point. I don't think so. It could be that it is kept in sync > with one Zope instance "being responsible" and the others calling > it via XML

Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-12 Thread Morten W. Petersen
[Erik Enge] | What happens if you run this with ZEO? Will the file be kept «in | sync» with all ZEO Clients? Good point. I don't think so. It could be that it is kept in sync with one Zope instance "being responsible" and the others calling it via XML-RPC. Cheers, Morten ___

Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-11 Thread Erik Enge
[Morten W. Petersen] | There's a new product available, which enables unique ids in a given context, | take a look at http://www.zope.org/Members/morphex/ThreadSafeCounter>. What happens if you run this with ZEO? Will the file be kept «in sync» with all ZEO Clients? ___

Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-11 Thread Morten W. Petersen
[Chris Withers] | So would a counter such as: | | class PersistentCounter(Persistent): | | # create the counter | def __init__(self, value=0): | self._value = value | | # get the value of the counter without incrementing | def getValue(self): | return self._valu

Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-11 Thread Steve Alexander
Chris Withers wrote: > "Morten W. Petersen" wrote: > >> There's a new product available, which enables unique ids in a given context, >> take a look at http://www.zope.org/Members/morphex/ThreadSafeCounter>. > > > So would a counter such as: > > class PersistentCounter(Persistent): > > #

Re: [Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-11 Thread Chris Withers
"Morten W. Petersen" wrote: > > There's a new product available, which enables unique ids in a given context, > take a look at http://www.zope.org/Members/morphex/ThreadSafeCounter>. So would a counter such as: class PersistentCounter(Persistent): # create the counter def __init__(self

[Zope-dev] ThreadSafeCounter 0.0.1 released

2001-02-10 Thread Morten W. Petersen
Hi guys, There's a new product available, which enables unique ids in a given context, take a look at http://www.zope.org/Members/morphex/ThreadSafeCounter>. Cheers, Morten ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/lis