Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1762030979, "reponame":"libwebsockets", "desc":"libwebsockets lightweight C networking library", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets", "f":3, "items": [ {"schema":"libjg2-1", "cid":"3db8ac75ed634fb56421bf997ff905a7", "commit": {"type":"commit", "time": 1749709033, "time_ofs": 60, "oid_tree": { "oid": "7eb2b3d211188ee9e90bace02ee0bfa0cd19495a", "alias": []}, "oid":{ "oid": "111dc6d73117946015eecf0d4fa5c9bf2b80524d", "alias": []}, "msg": "cov: threadpool: lock during destruction", "sig_commit": { "git_time": { "time": 1749709033, "offset": 60 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }, "sig_author": { "git_time": { "time": 1749709031, "offset": 60 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }}, "body": "cov: threadpool: lock during destruction\n" , "diff": "diff --git a/lib/misc/threadpool/threadpool.c b/lib/misc/threadpool/threadpool.c\nindex 1183b47..9dbbcc2 100644\n--- a/lib/misc/threadpool/threadpool.c\n+++ b/lib/misc/threadpool/threadpool.c\n@@ -826,6 +826,7 @@ lws_threadpool_destroy(struct lws_threadpool *tp)\n #if defined(WIN32)\n \tSleep(1000);\n #endif\n+\tpthread_mutex_lock(\u0026tp-\u003elock); /* \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d tpool lock */\n \n \ttask \u003d tp-\u003etask_done_head;\n \twhile (task) {\n@@ -835,6 +836,8 @@ lws_threadpool_destroy(struct lws_threadpool *tp)\n \t\ttask \u003d next;\n \t}\n \n+\tpthread_mutex_unlock(\u0026tp-\u003elock); /* -------------------- tpool unlock */\n+\n \tpthread_mutex_destroy(\u0026tp-\u003elock);\n \n \tmemset(tp, 0xdd, sizeof(*tp));\n","s":{"c":1762030979,"u": 2511}} ],"g": 3817,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}