Skip to content

Commit

Permalink
added some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Apr 4, 2024
1 parent 1c6fad5 commit 2faaf41
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/org/rascalmpl/debug/IRascalMonitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ default void jobStart(String name, int totalWork) {
jobStart(name, 1, totalWork);
}

/**
* This utility method is not to be implemented by clients. It's a convenience
* function that helps to guarantee jobs that are started, are always ended.
*/
default void job(String name, int totalWork, Supplier<Boolean> block) {
boolean result = false;
try {
Expand All @@ -50,7 +54,13 @@ default void job(String name, int totalWork, Supplier<Boolean> block) {
jobEnd(name, result);
}
}


/**
* This utility method is not to be implemented by clients. It's a convenience
* function that helps to guarantee jobs that are started, are always ended.
* Also it provides easy access to the name of the current job, such that
* this "magic" constant does not need to be repeated or stored elsewhere.
*/
default void job(String name, int totalWork, Function<String, Boolean> block) {
boolean result = false;
try {
Expand Down

0 comments on commit 2faaf41

Please sign in to comment.