Skip to content

Commit

Permalink
Add a new system property to control the defered IO. Still needs more…
Browse files Browse the repository at this point in the history
… work though - in particular a number of FS operations probably should use it, and a number of FS operations should not use it (as its unnecessary for some).
  • Loading branch information
AlexIIL committed Aug 5, 2023
1 parent b8ead42 commit 02cc1ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@QuiltLoaderInternal(QuiltLoaderInternalType.NEW_INTERNAL)
class DeferredNioExecutionHandler {
// private static final ThreadLocal<Boolean> DEFERRED_REQUIRED = new ThreadLocal<>();
private static final boolean DEFER_REQUESTED = true;// System.getProperty("fabric.resource-loader.deferFilesystemOperations", "false").equalsIgnoreCase("true");
private static final boolean DEFER_REQUESTED = Boolean.getBoolean(SystemProperties.ALWAYS_DEFER_FILESYSTEM_OPERATIONS);
private static ExecutorService EXECUTOR_SERVICE;

public static boolean shouldDefer() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public final class SystemProperties {
public static final String DISABLE_BEACON = "loader.disable_beacon";
public static final String DEBUG_DUMP_FILESYSTEM_CONTENTS = "loader.debug.filesystem.dump_contents";
public static final String DEBUG_VALIDATE_FILESYSTEM_CONTENTS = "loader.debug.filesystem.validate_constantly";
public static final String ALWAYS_DEFER_FILESYSTEM_OPERATIONS = "loader.workaround.defer_all_filesystem_operations";

private SystemProperties() {
}
Expand Down

0 comments on commit 02cc1ea

Please sign in to comment.