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

Async Parsing #2

Open
jagrosh opened this issue Sep 17, 2018 · 0 comments
Open

Async Parsing #2

jagrosh opened this issue Sep 17, 2018 · 0 comments

Comments

@jagrosh
Copy link
Owner

jagrosh commented Sep 17, 2018

Right now, a single Parser can only parse in a synchronized format, and the Parser only has one Environment that is used during parsing. On the other hand, all Methods are immutable and would work perfectly fine in an asynchronous environment.

In most cases, JagTag is used just for text processing, and thus async processing is not needed (and would mean more overhead to create additional Environments). However, JagTag is perfectly viable for actions beyond text processing that may take more time (web requests, image manipulation), and forcing creation of a new Parser for each parse is unnecessary.

Allowing asynchronous parsing would mean re-using the Parser but doing one of the following:

  • Supplying an Environment to be used during parsing
  • Allowing an empty Environment to be created when parsing begins
  • Utilizing some sort of 'Action' template that allows 'building' the Environment and then parsing using it
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

1 participant