mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-09-28 09:48:17 +03:00
## Description of change Finally figured out where the deadlock was coming from - it's because the `dump_to_logger` was writing `SuperstepSound: Audio device is not available` to the logger which calls back into the log hook, and then emits another deferred message, trying to acquire the lock again on the same stack. ## Testing Tested the superstep sound failure case again.
15 lines
347 B
C++
15 lines
347 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <initializer_list>
|
|
|
|
namespace deferredlogs {
|
|
|
|
// some shared error messages
|
|
extern const std::initializer_list<std::string> SUPERSTEP_SOUND_ERROR_MESSAGE;
|
|
|
|
void defer_error_messages(std::initializer_list<std::string> messages);
|
|
void dump_to_logger(bool is_crash=false);
|
|
}
|