MCPcopy Create free account
hub / github.com/tdrussell/diffusion-pipe / fd_id

Function fd_id

utils/reduction.py:528–533  ·  view source on GitHub ↗
(fd)

Source from the content-addressed store, hash-verified

526
527
528def fd_id(fd):
529 # Returns a tuple which uniquely identifies a file descriptor. In Mac OS,
530 # this doesn't work with shared memory handles, which is why we don't
531 # support the "file_descriptor" sharing method on that platform.
532 stat = os.fstat(fd)
533 return (stat.st_ino, stat.st_dev)
534
535
536def storage_from_cache(cls, key):

Callers 2

rebuild_storage_fdFunction · 0.85
reduce_storageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected