Thread Pool memory ownership
Maxim Dounin
mdounin at mdounin.ru
Thu Jun 1 14:06:07 UTC 2023
Hello!
On Thu, Jun 01, 2023 at 09:29:58PM +1000, Mathew Heard wrote:
> Thank you,
>
> I understand and it makes sense.
>
> Do you have any advice for how third party modules could acheive the same?
> The blocked field might be safe to use within other phases but it's
> difficult to fully verify.
>
> I'm no longer using that module (having found an alternative) but I'm
> willing to push an issue to them in the spirit of oss.
For http, using r->blocked to prevent request from being freed is
the correct and the only available approach.
> Perhaps a comment in the nginx developer docs regarding the correct way to
> get memory for a thread pool task would be a good idea? It seems like a
> common problem for which there is limited examples for reference.
While it might be, I doubt there are people willing to and
qualified enough to work on this. In general, nginx is documented
in C and commit logs, and existing developer docs only explain
some basic concepts.
--
Maxim Dounin
http://mdounin.ru/
More information about the nginx-devel
mailing list