Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add Zone.onEnter / onLeave #17532
I'm wary about adding more overhead to zone entry/exit (it will cost, at least one lookup of "is onZoneEnterOrExit overridden").
At a fundamental level, a zone isn't being "enterede" and "exited", it's just that the currently executing code has a zone associated with it. That zone can be changed in a number of ways, mostly by
Entering a zone is usually somewhat well-delimited, but exiting is harder to define. Are you exiting a zone when you enter another zone with
In any case, it's not without cost, even if you don't use it. There is no such thing as a free lunch :)