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

Usage from real-time application #22

Closed
in0finite opened this issue Dec 9, 2023 · 3 comments · Fixed by #32
Closed

Usage from real-time application #22

in0finite opened this issue Dec 9, 2023 · 3 comments · Fixed by #32
Labels
resolution/fixed type/feature New feature or request

Comments

@in0finite
Copy link
Contributor

How would I use the library from real-time application which has it's own Message Loop (eg. GUI application) ?

Right now, the only way to parse demo file would be to call async method which would run in a different thread. It would be much better if the control of parsing is done by user of the library. That way, he can pause the parser, move to next tick, seek through history, etc.

Basically, a non-async version which allows the user to advance through demo file tick by tick.

I already implemented this myself (with additional API, no breaking changes), and would like to open PR, but I wanted to ask you what you think about it ?

@saul
Copy link
Owner

saul commented Dec 24, 2023

Here's a WIP PR - #32. Are you still able to use async APIs? I've added ConfigureAwait(false) in all of the necessary places in the library, so you should be able to use them from WinForms now.

@in0finite
Copy link
Contributor Author

Thank you for solving it so fast.

That PR looks excellent. I think that's all I need. Async APIs are fine.

Btw, this is my environment: I am trying to use the library in Unity engine. However, Unity can't run anything newer than .NET 4.8. So, in order to use the library I can either:

  • compile to native library (using AOT) then import it's methods and marshal data back-and-forth
  • build the executable and run it from Unity, using Standard Input / Standard Output to marshal data - this is what I am currently doing

@saul saul closed this as completed in #32 Dec 30, 2023
@saul saul added type/feature New feature or request resolution/fixed labels Dec 30, 2023
@saul
Copy link
Owner

saul commented Dec 30, 2023

Released as v0.8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution/fixed type/feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants