upd: ready to write the database and engine

This commit is contained in:
2023-12-12 15:46:43 +00:00
parent 824145ec39
commit d9d32c5e24
8 changed files with 65 additions and 64 deletions

View File

@ -1,5 +1,10 @@
#include "bs-utility.h"
namespace BookStore_ZYM {
std::mutex debug_Print_Mutex;
bool shut_down = false;
} // namespace BookStore_ZYM
BlockingStringStream &BlockingStringStream::getline(std::string &str,
char delim) {
std::unique_lock<std::mutex> lock(mutex);
@ -43,10 +48,7 @@ void ReadWriteLock::endWrite() {
is_writing = false;
cv.notify_all(); // 唤醒所有等待的读操作和写操作
}
namespace BookStore_ZYM {
std::mutex debug_Print_Mutex;
bool shut_down = false;
} // namespace BookStore_ZYM
void debugPrint() {
BookStore_ZYM::debug_Print_Mutex.lock();
std::cerr << std::endl;