TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Erik Huelsmann
from: Peter Schuller
date: 1997-02-13 07:03:16
subject: Re: Multiple threads accessing the same files

>  PS> 2) When a lot of data is to be processed, what do I do? Let's say a
 >  PS> user scans  the file-base for new files, then the entire file-base
 >  PS> would have to be sent  to the client. Or should I let the server take
 >  PS> care of the searching? The only  problem then is that other clients
 >  PS> will have to w8, and I can't launch another  thread, be cause then
 >  PS> I'd have the access problem again upon other clients  wanting to
 >  PS> write data. One way would be to queue the search so that the server 
 >  PS> only "search" for 0.5 seconds at a time, and then
work on other
 >  PS> clients, then  resume the searching for 0.5 secs, and so on... You've
 >  PS> got any ideas? I'm  getting close now :-)

 > This awfully looks like multitasking! Maybe you can start up an extra 
 > thread for searching, so that the server can wait for its next client 
 > command?

Yeah, that's a good idea! But even though, it will create delys. That's what 
I'm afraid of. Threads wanting to write to the files will encounter problems. 
And if I launch ANOTHER thread, that takes care of the writing, while the rest 
of the node (BBS) continues, it could create other problems, such as two users 
adding the same file to the system. That would result in the used uploading a 
filem, and after 10 seconds being told it already exists :-(.. God this is 
hard! I'll poke around some more..

/ 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™.