Aaron Ross wrote:
> > > my $db_key = tie( %{$Rhash}, 'BerkeleyDB::Btree',
> > > -Flags=>DB_CREATE,
> > > -Filename=>$file,
> > > -Env=>$env );
> > > die "Can't open $file: $! ".$BerkeleyDB::Error."\n" if !$db_key;
> > > return $db_key;
>
>I was wondering if using tie() instead of just the OO interface was
>causing a problem. Maybe rewriting the code to just use new() would
>help? Of course that means losing the hash interface.
Of course, that would avoid the problem, because I wouldn't be using
DB's built-in locking anymore :-) Using tie() means losing the
environment, which is needed for DB's internal locking.
In a production environment with thousands of hits per hour coming in
on multiple threads, I really don't trust flock() to do the job.
Dan Wilga [EMAIL PROTECTED]
Web Technology Specialist http://www.mtholyoke.edu
Mount Holyoke College Tel: 413-538-3027
South Hadley, MA 01075 "Who left the cake out in the rain?"