Skip to content
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

Asynchronous Support #13

Open
svermeulen opened this issue Apr 1, 2015 · 3 comments
Open

Asynchronous Support #13

svermeulen opened this issue Apr 1, 2015 · 3 comments

Comments

@svermeulen
Copy link

I'm working on integrating this TinCan library into some software and am finding that it freezes briefly whenever I try writing some data to the LRS. Has there been any thought towards making this asynchronous? Ideally it could internally manage an ongoing queue of requests rather than blocking for each one.

@brianjmiller
Copy link
Member

Considered, yes, but I can say it isn't on a roadmap nor does it have an expected date. It would be unlikely for us to add a queue structure to the library itself or implement a thread model since these things are usually very implementation specific and are better off handled by the application code than a library like this one. If you aren't in .NET 4.5 then I'd suggest managing an LRS thread(pool) yourself to deal with the blocking.

Having said that, my approach would likely use .NET 4.5's async/await capability through the HttpWebRequest. I've not looked into whether we could issue different dll's for the two versions or how that might look. I'm not too opposed to forcing people on to a newer version than 3.5, but they'd have to be getting something significant (which async might be enough to warrant).

To that end, pull requests are accepted if well conceived and hopefully with unit tests. The RemoteLRS class has a MakeSyncRequest abstraction already that could have a counterpart MakeAsyncRequest and it should be fairly straightforward to make the rest of the class compatible.

@brianjmiller
Copy link
Member

I should have also included that we consider bounty based work on any of our OSS libs, if you want a defined approach and timeline.

@svermeulen
Copy link
Author

Thanks Brian,
I will experiment with different approaches and will probably end up changing the library a bit. If the result is something that I feel may have value for others I'll make a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants