Folks,

I have what seems to be an odd problem with persistence of information
in simultaneous sessions.

I keep track of an iterator in an object that is persistent (one
instance per-session). The iterator is updated as the user navigates a
sequence of objects. The iteration seems to work fine for a single user.

If 2 users A and B access the system simultaneously, each users
navigation is occasionally thrown off (ie: the session seems to lose
track of the iterator state). Mysteriously, this doesn't always
happen - most of the time, users can navigate without issue.

What might be going on here? My session object access looks sort of
like this:

  session = ISession(self.request)[APP_NAME]
  # I checked; session appears to be unique for each user

  # initialize per-session hash
  if not session.has_key('iterdata'): session['iterdata'] = {}

  # store iterator; FolderIterator has a currentId member.
  if not session['iterdata'].has_key(uniqueName):
    session['iterdata'][uniqueName] = FolderIterator()

  return session['iterdata'][uniqueName]






_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to