Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Function

hit

Public Function
std.Build.Cache.Manifest.hit
pub fn hit(man: *Manifest, parent_progress_node: std.Progress.Node) HitError!bool

Check the cache to see if the input exists in it. If it exists, returns true. A hex encoding of its hash is available by calling final.

This function will also acquire an exclusive lock to the manifest file. This means that a process holding a Manifest will block any other process attempting to acquire the lock. If want_shared_lock is true, a cache hit guarantees the manifest file to be locked in shared mode, and a cache miss guarantees the manifest file to be locked in exclusive mode.

The lock on the manifest file is released when deinit is called. As another option, one may call toOwnedLock to obtain a smaller object which can represent the lock. deinit is safe to call whether or not toOwnedLock has been called.

Params

File

Build/Cache.zig:476
476
477
478
479
480
    pub fn hit(man: *Manifest, parent_progress_node: std.Progress.Node) HitError!bool {
        const node = parent_progress_node.start("Reusing Cache Artifacts", 0);
        defer node.end();
        return hitInner(man);
    }