You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 7235 Reporter: furuse Assigned to:@pierreweis Status: assigned (set by @damiendoligez on 2017-02-23T15:29:02Z) Resolution: open Priority: normal Severity: minor Version: 4.02.3 Category: standard library Monitored by:@gasche
Bug description
I have just noticed that the following code of stdlib/format.ml:
(* Output everything left in the pretty printer queue at end of execution. *)
let () = at_exit print_flush
This code only flushes Format.std_formatter. I am not sure it is easily possible to flush all the formatters associated with out_channels alive when at_exit is called but at least we can flush Format.err_formatter here too.
The text was updated successfully, but these errors were encountered:
Indeed, we should also flush err_formatter at end of program.
Extending this benavior to all formatters created by the library is more problematic since it could lead to excessive memory consumption (keeping track of all allocated formatters in a list or adding a closure for each new formatter to the list of thunks to execute at exit).
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.
Original bug ID: 7235
Reporter: furuse
Assigned to: @pierreweis
Status: assigned (set by @damiendoligez on 2017-02-23T15:29:02Z)
Resolution: open
Priority: normal
Severity: minor
Version: 4.02.3
Category: standard library
Monitored by: @gasche
Bug description
I have just noticed that the following code of stdlib/format.ml:
(* Output everything left in the pretty printer queue at end of execution. *)
let () = at_exit print_flush
This code only flushes Format.std_formatter. I am not sure it is easily possible to flush all the formatters associated with out_channels alive when at_exit is called but at least we can flush Format.err_formatter here too.
The text was updated successfully, but these errors were encountered: