Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

[Wip] Differentiate write and write2 + simplify #526

Closed
wants to merge 2 commits into from

Conversation

benaadams
Copy link
Contributor

UvWriteReq only uses pooled blocks
UvWrite2Req only has one buffer
List<GCHandle> isn't needed

From #519

/// <summary>
/// Summary description for UvWriteRequest2
/// </summary>
public class UvWrite2Req : UvRequest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class name and file name are inconsistent. I personally prefer UvWriteReq2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed


public unsafe void Write2(
UvStreamHandle handle,
ArraySegment<byte> buf,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it would be better to put the dummy buffer in this class and use a static pBuffers object. Better encapsulation probably.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better yet. Create the dummy buffer in this class using CreateMemory. This way the only GCHandle we have to bother with is _pinUvWrite2Req.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made change for this but can't test due to dotnet/aspnetcore#1207

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@benaadams Do you still have this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, though will have to add it to PR after Saturday (Playtest this weekend so focused on that)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me. Good luck with the playtest!

@benaadams
Copy link
Contributor Author

Still needs a change as above

@benaadams benaadams changed the title Differentiate write and write2 + simplify [Wip] Differentiate write and write2 + simplify Jan 22, 2016
@muratg
Copy link
Contributor

muratg commented Feb 4, 2016

@benaadams Still working on this?

@benaadams
Copy link
Contributor Author

Not at the moment; would be a slight breaking change though would be weird if anyone but Kestrel took a dependency on them

@muratg muratg added this to the Backlog milestone Feb 4, 2016
@benaadams
Copy link
Contributor Author

Going to close this and raise as an issue

@benaadams benaadams closed this Feb 19, 2016
@benaadams benaadams deleted the UvWriteReq2 branch May 10, 2016 10:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants