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
I see in a number of extension classes the same logic:
check whether close has been called before
check whether the object (delegate) has been previously created
if so then close/shutdown the object (delegate / contained)
Would it not be better to have the Lazy* super class not already ensure this itself. The close method being final (not in terms of signature because that would break the api) and only being executed once at least in terms of what extensions would see via a hook method(s) for when close must be performed.
close() -> onClose(T)
or
close() -> close(T)
after checking that the reference (T) was not null and that close() was not already previously dispatched
The text was updated successfully, but these errors were encountered:
one thing this implies is cutting in two-steps, ex fixing here, releasing, then fixing elsewhere. Alternatively, we could make the lazy type not internal, and just design the new one like that.
Is generalizing the Lazy behaviour still going to happen or are we going to be lazy about it and let it be ? Lazy consensus applies, if i don't hear back in a couple of weeks i'm closing this.
from @autoletics in openzipkin/zipkin-reporter-java#24 (comment)
I see in a number of extension classes the same logic:
check whether close has been called before
check whether the object (delegate) has been previously created
if so then close/shutdown the object (delegate / contained)
Would it not be better to have the Lazy* super class not already ensure this itself. The close method being final (not in terms of signature because that would break the api) and only being executed once at least in terms of what extensions would see via a hook method(s) for when close must be performed.
close() -> onClose(T)
or
close() -> close(T)
after checking that the reference (T) was not null and that close() was not already previously dispatched
The text was updated successfully, but these errors were encountered: