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

Add producer-consumer pattern #3

Closed
HugoMendes98 opened this issue Jun 20, 2023 · 0 comments · Fixed by #11
Closed

Add producer-consumer pattern #3

HugoMendes98 opened this issue Jun 20, 2023 · 0 comments · Fixed by #11
Assignees
Labels
enhancement New feature or request ProdCons Producer-Consumer
Milestone

Comments

@HugoMendes98
Copy link
Member

HugoMendes98 commented Jun 20, 2023

That was the original purpose of this repository...

Example:

(async () => {
  const pc = new ProdCons<number>([1,2,3]);

  observable.subscribe(data => ps.write(data));

  const [i1, ...rest] = await pc.read(4);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ProdCons Producer-Consumer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant