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

LocalRb Producer type alias? #23

Open
dcvz opened this issue Mar 9, 2023 · 1 comment
Open

LocalRb Producer type alias? #23

dcvz opened this issue Mar 9, 2023 · 1 comment

Comments

@dcvz
Copy link

dcvz commented Mar 9, 2023

Hi @agerasev ,

Question for you: is there a type alias to use when using a LocalRb for Producer?

HeapRb has HeapProducer but cannot figure out the correct type for a Producer of LocalRb

@agerasev
Copy link
Owner

Hi!

Unfortunately, I haven't created such aliases for LocalRb as it rarely used, in my opinion.

But you can write the full type of local producer by yourself:

  • For heap-allocated local producer: Producer<T, Arc<LocalRb<T, Vec<MaybeUninit<T>>>>>
  • For static local producer/consumer: Producer<T, &'a LocalRb<T, [MaybeUninit<T>; N]>>

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