-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ref struct caller #214
Ref struct caller #214
Conversation
I thought I'd let the time zone differential work in my favour today ;) |
This looks good; I guess the explicitly defined delegates weren't as bad as I thought they'd be. Let's merge #213, rebase this PR, and then I'll review it for inclusion in the next release. |
We should be able to rebase this now. |
3917d22
to
5b51958
Compare
Rebased onto main. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thanks for this and I'm glad we can now leave the escaping of Caller
from the current frame up to the C# compiler 👍.
Okay, with everything merged, I'm going to cut releases and call out any potential API incompatibilities. |
This builds on #213, merge that firstThird time lucky?
Replaced
Caller
with aref struct
. With the reflection path stripped out and the removal ofIStore
this was a fairly simple change.A few notable changes:
Caller
, any breakage here is probably uncovering a bug.Caller
is no longer disposable (we could add an emptyDispose()
method and mark it[Obsolete]
?).Also this test:
Did not compile becauseNever mind, see comment by kpreisser below.act
is now aCallerAction
instead of anAction
, which is surprising change ofvar
inference. Fixed by changingvar
toAction
.Benchmark
Unlike my previous epoch based approach in #212 (which was 90ns slower) this benchmarks at exactly the same speed as the
class Caller
approach.