Skip to content

Non blocking implementation#118

Open
YarekTyshchenko wants to merge 4 commits intoela-compil:masterfrom
YarekTyshchenko:non-blocking
Open

Non blocking implementation#118
YarekTyshchenko wants to merge 4 commits intoela-compil:masterfrom
YarekTyshchenko:non-blocking

Conversation

@YarekTyshchenko
Copy link
Contributor

@YarekTyshchenko YarekTyshchenko commented Dec 7, 2022

  • Remove casting of BacnetAsyncResult to IAsyncResult
  • Add WIP Async method that uses new non-blocking code

Should partly address issues in #46 allowing the library to be used with concurrent queries, as long as invokeId issues are handled externally

Some questions about the changes:

  • How to deal with breaking changes to the API? The library makes far too many things public, so its impossible to know if any of them are used. Perhaps upping the major version, or keeping changes branched?
  • ManualResetEvent is used in LastSegmentAck, but in my tests I haven't been able to trigger that codepath
  • I don't know how well this plays with other transport protocols, I've only extensively tested UDP

The package is published temporarily here: https://www.nuget.org/packages/BACnet-fork-yarekt/

Using that interface prevents any meaningful refactoring towards task
based system
ManualResetEvent blocks threads. Since network read operations can be
done in a true non-blocking fashion, using MRE needlessly blocks
threads.
@YarekTyshchenko YarekTyshchenko marked this pull request as ready for review February 9, 2023 11:35
@YarekTyshchenko YarekTyshchenko changed the title WIP Non blocking implementation Non blocking implementation Feb 9, 2023
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