Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: (Fwd) Re: [PATCH] db/gdbm rewrite



On Sun, Feb 19, 2017, at 12:46 AM, Sebastian Gniazdowski wrote:
> change in Zsh forked process is a hole. It can be turned into an
> feature, though. A new builtin "zgdbmfetch paramname key" could be
> provided to re-fetch element when someone is going to try to do
> concurrent access with inherited FD and GDBM_SYNC lock, say with use of
> zsystem flock on other FD.

PS. Doing "fetch" might seem not nice in "hash-as-database" frontend,
but it would just clear PM_UPTODATE flag, rest is automatic. So maybe
"zgdbmclear param key".  In my gdbm update I allocate regular Params
instead of heap-arena-ghosts, access database only when needed
leveraging PM_UPTODATE and GDBM_SYNC, it might be even possible to open
database without GDBM_SYNC and do locking with a "gdbmlock" builtin.

-- 
  Sebastian Gniazdowski
  psprint2@xxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author