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

Process Each Item in an Array of Objects as Soon as It Completes #30

Open
raftx24 opened this issue Sep 24, 2024 · 1 comment
Open

Process Each Item in an Array of Objects as Soon as It Completes #30

raftx24 opened this issue Sep 24, 2024 · 1 comment

Comments

@raftx24
Copy link
Contributor

raftx24 commented Sep 24, 2024

In many scenarios, when working with an array of objects, you might want to process each item independently as soon as it finishes, rather than waiting for all items to complete. This is particularly useful when dealing with asynchronous tasks, where each operation might take varying amounts of time. If this is deemed a valuable addition, I would be happy to implement this functionality.

@ddebowczyk
Copy link
Contributor

ddebowczyk commented Oct 1, 2024

Please check responseModel: Sequence::of(YourClass::class) + streaming on - I think it might be what you are looking for.
https://docs.instructorphp.com/advanced/sequences

If that's not the case, feel free to suggest how this could be solved.

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

No branches or pull requests

2 participants