Re: CustomObject.globalID() problem

Sebastien Bigaret <[email protected]> 08 Oct 2004 11:02:41 +0200
Newsgroups gmane.comp.python.modeling
Message-ID <[email protected]>
[email protected] wrote:
> On 05 Oct 2004 23:42:47 +0200
> Sebastien Bigaret <[email protected]> wrote:
>=20
> > Okay; if you observe that a freshly fetched object has None as globalId=
(),
> > this is definitely a bug, so do not hesitate to report!
>=20
> I have a deadline on friday and don't have time to write a test, it's nas=
ty
> ( or simply a problem with my code ) since it appears only if another thr=
ead is
> fetching the same object from the same EC while I try to retrieve the Glo=
balID.
> Wouldn't worry until I got some real evidence :-)

Are you, by any chance, concurrently accessing the same EC without
locking it?  If you do, then maybe you should probably re-read the
dedicated section in the User's Guide :)
http://modeling.sourceforge.net/UserGuide/framework-integration-MT-consider=
ations.html

  Operations on an EC is not thread-safe by default, and concurrent
  access w/o locking it first could lead to the behaviour you observe
  (where an object can be observed w/ a gID=3D=3DNone by a given thread
  while the fetch procedure is still processed in an other thread).


-- S=E9bastien.



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl