Special API that is C-FFI-like exported from the RLB later.
This commit is contained in:
Jan-Erik Rediger 2022-01-25 10:59:08 +01:00 коммит произвёл Jan-Erik Rediger
Родитель 53a1da03e4
Коммит 86e89e936b
1 изменённых файлов: 20 добавлений и 0 удалений

Просмотреть файл

@ -438,6 +438,26 @@ pub fn persist_ping_lifetime_data() {
});
}
/// Unblock the global dispatcher to start processing queued tasks.
pub extern "C" fn rlb_flush_dispatcher() {
let was_initialized = was_initialize_called();
// Panic in debug mode
debug_assert!(!was_initialized);
// In release do a check and bail out
if was_initialized {
log::error!(
"Tried to flush the dispatcher from outside, but Glean was initialized in the RLB."
);
return;
}
if let Err(err) = dispatcher::flush_init() {
log::error!("Unable to flush the preinit queue: {}", err);
}
}
fn initialize_core_metrics(glean: &Glean, client_info: &ClientInfoMetrics) {
core_metrics::internal_metrics::app_build.set_sync(glean, &client_info.app_build[..]);
core_metrics::internal_metrics::app_display_version