Move trap handler initialization to per-Store (#1644)
Previously we initialized trap handling (signals/etc) once-per-instance but that's a bit too granular since we only need to do this as one-time per-program initialization. This moves the initialization to `Store` instead which means that we'll call this at least once per thread, which some platforms may need (none currently do, they all only need per-program initialization, but Fuchsia will need per-thread initialization).
This commit is contained in:
@@ -253,7 +253,7 @@ cfg_if::cfg_if! {
|
||||
/// function needs to be called at the end of the startup process, after other
|
||||
/// handlers have been installed. This function can thus be called multiple
|
||||
/// times, having no effect after the first call.
|
||||
pub fn init() {
|
||||
pub fn init_traps() {
|
||||
static INIT: Once = Once::new();
|
||||
INIT.call_once(real_init);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user