Skip to content

Commit e38f844

Browse files
committed
shift fflush and fix some typos in docstrings
1 parent c99ec19 commit e38f844

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

src/clib/status_reporting.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ static void vprint_err_(
4646
stderr, "Grackle-%s %s:%d in %s] %s\n", descr, locinfo.file,
4747
locinfo.lineno, santized_func_name, msg_buf
4848
);
49-
fflush(stderr); // probably unnecessary for stderr
5049

5150
if (dynamic_msg_buf != NULL) { free(dynamic_msg_buf); }
5251
}
@@ -57,6 +56,9 @@ void grimpl_abort_with_internal_err_(
5756
va_list args;
5857
va_start(args, msg);
5958
vprint_err_(1, locinfo, msg, args);
59+
// while stderr should flush by default, people may overwrite this behavior.
60+
// We want to force flushing here since we are aborting the program
61+
fflush(stderr);
6062
abort();
6163
}
6264

src/clib/status_reporting.h

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,16 @@
6666
/// might want to report. 2 are currently relevant. 2 more may become relevant
6767
/// in the future. These result/statuses may include
6868
/// - the API function successfully completed an operation
69-
/// - (may become relevant with GPUs) a function can be configured to be
70-
/// either synchronous or asynchronous just succesfully launched a GPU
71-
/// kernel. (honestly, we may choose to simply denote success)
72-
/// - A(may become relevant with GPUs) a temporary error
73-
/// occurred that could be overcome by trying again. For example, a GPU had
74-
/// too much pending work (honestly, we may want to configure Grackle so it
75-
/// knows to try again).
69+
/// - (may become relevant with GPUs) a function, which can be configured to be
70+
/// either synchronous or asynchronous (@ compile-time or runtime), wants to
71+
/// report that it is being invoked in an "asynchronous mode" and that it
72+
/// succesfully launched a GPU kernel. The premise is that the function would
73+
/// report the successful-completion status if the function had been
74+
/// configured in its "synchronous mode," and the whole operation had been a
75+
/// success. (Honestly, we may choose to simply denote success in both cases)
76+
/// - (may become relevant with GPUs) a temporary error occurred that could be
77+
/// overcome by trying again. For example, a GPU had too much pending work
78+
/// (honestly, we may want to configure Grackle so it knows to try again).
7679
/// - A generic error occurred that requires human-intervention
7780
///
7881
/// It is useful to highlight categories of these generic errors (the last of

0 commit comments

Comments
 (0)