Skip to content

Reduce send locking and add parallel-pipelining - #50

Open
willardf wants to merge 4 commits into
mainfrom
lockless-aes
Open

Reduce send locking and add parallel-pipelining#50
willardf wants to merge 4 commits into
mainfrom
lockless-aes

Conversation

@willardf

@willardf willardf commented Nov 1, 2022

Copy link
Copy Markdown
Owner

This only affects application data packets. Receives and internal sends like handshakes still lock the peer to avoid untangling that whole mess, but in principle, the pattern would support all of it.

Adding more threads into the send process creates some gotchas with disconnecting, so I also had to make a more synchronous path to ensure the encryption context is valid when we want to disconnect.

  • HazelPipelineSegment is a new wrapper around a blocking collection and thread pool. Technically receive workers could also be refactored to use one of these, but I didn't wanna go too crazy.
  • Moved some of the private DTLS structs into new files.
  • Also cleaned up and made some of the core tests more reliable.

@willardf
willardf force-pushed the main branch 8 times, most recently from f30e956 to ff5f86a Compare February 29, 2024 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant