You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 16, 2026. It is now read-only.
I'm working on backend/director abstraction in rust, and I can't wrap my head around one question, which is usually a sign I'm looking at the issue the wrong way.
So, I can call VRT_AddDirector to create a director, VCL_DelDirector to delete it, and the VCL code will use VRT_AssignBackend to increase the refcount.
But I don't see what prevents the vmod from creating a director, returning a VCL_BACKEND and then destroying the director before the VCL has a chance to call VRT_AssignBackend.
Conversely, if VRT_AssignBackend has the time to be called, then VCL_DelDirector should break because the refcount won't end up being 0?
I'm not doubting the code works, but I'm struggling to understand how it does. Is there a guarantee I missed that the vmod writer needs to maintain?
Hi,
I'm working on backend/director abstraction in
rust, and I can't wrap my head around one question, which is usually a sign I'm looking at the issue the wrong way.So, I can call
VRT_AddDirectorto create a director,VCL_DelDirectorto delete it, and the VCL code will useVRT_AssignBackendto increase the refcount.But I don't see what prevents the vmod from creating a director, returning a
VCL_BACKENDand then destroying the director before the VCL has a chance to callVRT_AssignBackend.Conversely, if
VRT_AssignBackendhas the time to be called, thenVCL_DelDirectorshould break because the refcount won't end up being 0?I'm not doubting the code works, but I'm struggling to understand how it does. Is there a guarantee I missed that the vmod writer needs to maintain?