| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: Multiple threads accessing the same files |
> To access multiple files, use sharing. One option is sopen - not ANSI,
> IIRC, but available in many compilers (Watcom included). The other option
> is to use DosOpen directly (I would recommend writing some sort of io
> library to go with it just in case you want to port to AIX or something -
> then you just rewrite the library rather than everything else).
There's only one thin with this sharing stuff. In read-only mode it's okay,
but not if data are to be written. And as you mentioned DosOpen (I think
too...) can w8 for a file to become avaliable if it's not. But the problem
then would be that if an other thread/proccess accesses the file and locks up,
the file will be locked for ever - causing the BBS to hang. But in the other
hand I'd be better do do my own loop instead of letting DosOpen handle it.
But this C/S thing. So what you mean is that I should 'create' a file that the
client reads directly through the server via a pipe? Let's see, pipe can be
read via DosOpen, right? I don't remember, but if so that's the perfect
solution! If a node wants to write data, then the server could create a temp-
file, and when the client closes the file, the server could write the data to
it. That's perfect! Only it takes up resources, but I'll have to doo. It
won't be easy to hang the BBS as long as I make the server stable as hell. I
think I'll go with that unless you have another opinion maybe?
Thanx!
/ Peter Schuller [TeamOS/2] petersch{at}kuai.se
--- AdeptXBBS v1.08a26 (VC) (Registered)
* Origin: Gamma Epsilon 24h/day +46-(0)18-367781 (2:206/139)SEEN-BY: 50/99 54/99 270/101 620/243 625/160 711/401 413 430 934 712/311 407 SEEN-BY: 712/505 506 517 623 624 704 713/317 800/1 @PATH: 206/100 205/625 270/101 712/624 711/934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.