[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
[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
[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?
___
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.
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
[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
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
[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
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: "
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
[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). :-)
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
[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
___
[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?
___
[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
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):
>
> #
"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
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
18 matches
Mail list logo