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

Run program once over all provided files or in parallel #111

Open
phorward opened this issue Jun 29, 2023 · 1 comment
Open

Run program once over all provided files or in parallel #111

phorward opened this issue Jun 29, 2023 · 1 comment
Assignees
Labels
discussion Further discussion on this topic required feature New feature or request help wanted Extra attention is needed

Comments

@phorward
Copy link
Member

phorward commented Jun 29, 2023

Tokay's current implementation runs the provided program separately on every input file: tokay program.tok -- file1 file2 file3 runs tokay.tok on file1, file2 and file3 separately and sequentially. This might not always be intended.

This behavior should be customizable and moved into the VM/Parselet-main layer. awks way, for example, is to run the provided PROGRAM on all files. The nextfile instruction forces to continue the program flow on the next file.

Additionally, tokays current way of running a program sequentially and separately on all provided files could be improved to run on all files simultaneously and in parallel.

This should be configured by command-line switches, and needs further investigation.

So these 3 modes could be useful:

  1. Run PROGRAM on files separately and sequentially (current behavior)
  2. Run PROGRAM on files separately and in parallel (improvement of current behavior)
  3. Run PROGRAM once on all files, sequentially, but keeping the runtime context. This might also require for a awk-style nextfile function or similar.
@phorward phorward added feature New feature or request help wanted Extra attention is needed discussion Further discussion on this topic required tokay labels Jun 29, 2023
@phorward phorward self-assigned this Jul 3, 2023
@phorward
Copy link
Member Author

Partly fixed by 172815a

@phorward phorward removed the tokay label Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Further discussion on this topic required feature New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant