Use global mutex

FossilOrigin-Name: 9fccdfd63fb68f851bb69636a9f6a61f6fd0b797bd32827802b7d78d3c9f3dbf
This commit is contained in:
nekobit 2022-10-16 00:59:28 +00:00
parent 4ecb46c745
commit fcd5abc7a8
2 changed files with 22 additions and 1 deletions

22
dist/js/main.js vendored
View File

@ -1,8 +1,30 @@
"use strict";
// Helper function for manipulating the DOM / creating DOM elements
function em(tag, values, child)
{
let element = document.createElement(tag);
// Can either be a "append"-able type, or properties
// If it's properties, then child must be set
if ((typeof values === 'string' ||
typeof values === 'number' ||
values instanceof HTMLElement) && !child)
{
element.append(element);
}
else if (typeof values === 'object' && child) {
for (const prop in values)
{
element[prop] = values[prop];
}
} // ???
// Type doesn't matter, just append whatever is in child
if (child)
{
element.append(child);
}
return element;
}

View File

@ -97,7 +97,6 @@ void render_base_page(struct base_page* page, FCGX_Request* req, struct session*
void send_result(FCGX_Request* req, char* status, char* content_type, char* data, size_t data_len)
{
static pthread_mutex_t print_mutex = PTHREAD_MUTEX_INITIALIZER;
if (data_len == 0) data_len = strlen(data);
#ifdef SINGLE_THREADED
printf(