We do not want DYAD interception in the middle of interception as it is not needed and only adds overhead.
If we block re-entrance into DYAD region to early, a legitimate access to a file under a managed directory can also be not intercepted. If block too late, then we incur needless cost for irrelevant accesses.
The right position to start blocking re-entrance is when we know the file is under a managed directory.
This is a little tricky for python API because dyad_get_metadata is separated from consume call.
We do not want DYAD interception in the middle of interception as it is not needed and only adds overhead. If we block re-entrance into DYAD region to early, a legitimate access to a file under a managed directory can also be not intercepted. If block too late, then we incur needless cost for irrelevant accesses. The right position to start blocking re-entrance is when we know the file is under a managed directory.
This is a little tricky for python API because dyad_get_metadata is separated from consume call.