PSP Help Doc Indexer System |
(Version 1.4.1) |
PSP - FileShare Unit ReferenceIntroduction
Tips and TricksIntroductionShared file access is a very important topic for both multithreaded and CGI programs. Even a simple hit counter may cause an I/O error (or other danger) when not taking shared access into account. In multithreaded applications, you can use common variables. However, in CGI you need something on the system I/O level. There are no general purpose cross-platform file sharing utilities available elsewhere, so the FileShare unit in PSP attempts to solve this problem by Advisory File Locking flags. It is a bit slower than system API locking, and it needs write access to whole directory - but fileshare is cross-platform, less specific, and therefore more maintainable.Advisory means that only fileshare functions understand these locking flags. There are two kinds of flags:
Tips and Tricks
|