mirror of
https://github.com/matrix-construct/construct
synced 2024-12-25 23:14:13 +01:00
ircd::gpt::model: Improve cache open mode related.
This commit is contained in:
parent
5d837f9e87
commit
9ca95591ff
1 changed files with 9 additions and 2 deletions
|
@ -185,14 +185,21 @@ ircd::gpt::model::init_from_cache(const string_view &cache_path)
|
|||
sizeof(model::decoder),
|
||||
};
|
||||
|
||||
const auto mode
|
||||
{
|
||||
cache_shared?
|
||||
std::ios::in | std::ios::out:
|
||||
std::ios::in
|
||||
};
|
||||
|
||||
const fs::fd fd
|
||||
{
|
||||
cache_path, std::ios::in //| std::ios::out
|
||||
cache_path, mode
|
||||
};
|
||||
|
||||
fs::map::opts map_opts
|
||||
{
|
||||
std::ios::in | std::ios::out
|
||||
mode
|
||||
};
|
||||
|
||||
map_opts.locked = bool(cache_locked);
|
||||
|
|
Loading…
Reference in a new issue