Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
Autoflush for DB_FILE to share a hash among cooperating processes?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Axel Boldt, post: 4758857"] Hello, I want to share a hash variable among several forked processes. Ideally I would use threads and threads::shared, but I need LWP which is not thread-safe. So I thought about using DB_FILE and a hash variable tied to the same file in each of the processes. If one process changes the hash variable, all others should see the change immediately. I.e. I want that the change is immediately flushed to disk, and that every access to the hash variable takes its value directly from disk, not from some internal cache. Is that possible? I have tried the O_SYNC flag for db_open and also the $db->sync() method to no avail. If it's not possible, what do people usually do to keep a set of cooperating processes informed about the results that the other processes have already computed? Thanks, Axel [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
Autoflush for DB_FILE to share a hash among cooperating processes?
Top