pya789
pya789
``` // 监听配置文件热修改 func watchConfigFiles(cfg *config.Config) { // 开一个新线程防止主线程被卡住 readyTask := new(sync.WaitGroup) readyTask.Add(1) go func() { watcher, err := fsnotify.NewWatcher() if err != nil { cliutil.Errorln(err.Error()) return } defer watcher.Close()...
Using nm -gC libSQLiteCpp.a | grep SQLite::Statement::bind to get the result. U SQLite::Statement::bind(int, char const*) U SQLite::Statement::bind(int, std::string const&) 0000000000000594 T SQLite::Statement::bindNoCopy(int, char const*) 00000000000005e6 T SQLite::Statement::bindNoCopy(int, void const*, int)...
1.nginx config ``` server { listen 4466; listen [::]:4466; server_name 39.164.146.201; index index.php index.html index.htm default.php default.html default.htm; root /xp/www/39.164.146.201_4466/; # SSL-START SSL配置(请勿删除此注释) # SSL-END(请勿删除此注释) # WAF-START(请勿删除此注释) modsecurity on; modsecurity_rules_file...
我有一个简单的缓存类 他给别的进程使用通过co库建立的套接字通信 每个读/写都是一个协程 读写操作都在一个实例里进行是否可以像下面一样使用std的读写锁进程操作? ``` void Cache::set(const std::string &key, const std::string &value, std::chrono::seconds expirationTime) { std::unique_lock lock(mutex_); if (expirationTime.count() == 0) { expirationTime = defaultExpirationTime_; } CacheItem item{value, std::chrono::steady_clock::now(), expirationTime};...