Hi,

As I mentioned a while ago on #varnish-hacking I've been thinking it'd be
kinda nice to have a delete keyword.
One of the reasons was to use malloc'd memory.  The other was to express
transformations like:

mod.func1(mod.func2(mod.func3(foo)))

In what I think a more friendly way:

bar.func1();
bar.func2();
bar.func3();

Or perhaps even:

bar.func1().func2().func3();

This weekend, while I was talking to Dag, I thought of another reason I'd
like to see this in: to have per-request states.

Currently this is done manually using ctx->req->sp->fd as an index to a
malloc'd list. The other option is to use thread-specific data but I was
explained this won't work over waitinglist'd requests. Both of these
approaches only work for single states btw.

A PRIV_REQ type will solve single state cases and has the extra benefit of
somewhat automatic clean up when the request is done.

Thoughts?

f.-
_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to