On Tue Nov 8 12:34:59 2022 +0000, Giovanni Mascellani wrote:
It would probably make more sense just to move the actual cleanup to
wg_parser_destroy(), although in order to do that we'll also need to call wg_parser_destroy() on the quartz parser earlier. I don't think that would change the issue substantially. The problem is that currently there is no synchronization between when the the reader thread calling `wg_parser_stream_get_buffer()` is done using the stream resources (particularly the condition variables) and when these resources are destroyed. Moving destruction to `wg_parser_destroy()`, in itself, wouldn't change much, because the client could call `RequestSample()` and then immediately `Shutdown()` and `Release()`.
Right, I forgot how the other frontends than quartz worked.