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

BlockingConcurrentQueue How do I delete all tasks #343

Open
ckJust opened this issue May 4, 2023 · 2 comments
Open

BlockingConcurrentQueue How do I delete all tasks #343

ckJust opened this issue May 4, 2023 · 2 comments

Comments

@ckJust
Copy link

ckJust commented May 4, 2023

No description provided.

@cameron314
Copy link
Owner

Dequeue them all.

If you know the queue is not being accessed concurrently by other threads, you can also start fresh like so:

ConcurrentQueue<int> q;
...
q = ConcurrentQueue<int>();

@randolf
Copy link

randolf commented May 15, 2023

I see the ~ConcurrentQueue() destructor that performs a variety of clean-up tasks, so this makes sense to me.

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

3 participants