Make the pipe, hub and mqtt separate threads with their own metadata queues. If one blocks, no new metadata is sent to it and the others are unaffected.

This commit is contained in:
Mike Brady
2020-05-30 15:49:00 +01:00
parent b915c2f527
commit 5decc1bb06
6 changed files with 301 additions and 130 deletions
+10
View File
@@ -1700,3 +1700,13 @@ int string_update_with_size(char **str, int *flag, char *s, size_t len) {
}
return *flag;
}
// from https://stackoverflow.com/questions/13663617/memdup-function-in-c, with thanks
void* memdup(const void* mem, size_t size) {
void* out = malloc(size);
if(out != NULL)
memcpy(out, mem, size);
return out;
}