www.virtualacorn.co.uk/forum

For support and advice on VirtualAcorn products
Forums now closed. This is an HTML only record of the content.
HTML version of Forum generated Thursday 24th May 2018

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: HostFS trouble: Opening files more than once...
PostPosted: Mon Apr 05, 2004 9:57 pm 
Offline

Joined: Mon Jan 05, 2004 11:30 pm
Posts: 12
Location: Oslo, Norway
HostFS doesn't seem to have any difficulties opening the same file more than once, even if one or more of them are with write-access. So if I do:

a%=OPENOUT"HostFS::HardDisc4.$.File"
b%=OPENOUT"HostFS::HardDisc4.$.File"

I get two different, valid handes, instead of a 'This file is already open' on the second file. This leads to problems when fetching mail: The debatching begins while the mail is being downloaded. There are probably more situations that this creates trouble.

Can something be done about that?...

Cheers,
Jan-Jaap


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 06, 2004 6:45 am 
Offline

Joined: Mon Feb 02, 2004 11:21 am
Posts: 10
Location: New Zealand
Ah that explains something - I've noticed the same problem using !PopStar, just didn't know why.

KJ


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 06, 2004 10:49 am 
Offline

Joined: Wed Oct 23, 2002 10:37 pm
Posts: 64
Ok, it's not entirely clear from the PRM's if there is a standard way.

ADFS seems to allow either multiple readonly opens _or_ a single readwrite open.

The other option is to allow multiple readonly opens _and_ a single readwrite open, which seems a bit more flexible.

Currently, as you say, hostfs allows multiple readwrite opens which is probably wrong and certainly causing problems.

The second option looks best to me but I'm open to suggestions,
Graeme


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 06, 2004 10:58 am 
Offline

Joined: Mon Jan 05, 2004 11:30 pm
Posts: 12
Location: Oslo, Norway
From a technical view, your second option indeed looks best, but from a practical standpoint I fear it isn't. If it would be implemented that way, debatching (read-only reading of the fetched mail) would still be possible while the mail is being downloaded (write access to that same file).

So I would prefer the first option, an emulation of ADFS (FileCore?) functionality...

Jan-Jaap


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 06, 2004 12:13 pm 
Offline

Joined: Wed Oct 23, 2002 10:37 pm
Posts: 64
Ok, I've changed the file open semantics to match those of FileCore, you can now have multiple opens for reading but opening for write needs exclusive access.

This will be included in a future update.

Graeme


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 06, 2004 12:22 pm 
Offline

Joined: Mon Jan 05, 2004 11:30 pm
Posts: 12
Location: Oslo, Norway
Great! Thanks!

Jan-Jaap


Top
 Profile  
 
 
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

   
cron
Forums originally Powered by phpBB © 2007 phpBB Group. Contents © 3QD Developments Ltd 2018 version no. 1.07