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

is there any examples for multi threads mode? #10

Open
shfxxer opened this issue Jan 3, 2025 · 0 comments
Open

is there any examples for multi threads mode? #10

shfxxer opened this issue Jan 3, 2025 · 0 comments

Comments

@shfxxer
Copy link

shfxxer commented Jan 3, 2025

in function log(std::size_t pos, Args&&... args)

it will execute multiple times buffer_or_write(&index, sizeof(uint8_t));
so it seems lockfree queue will not work for buffer write interfaces.

but how to use lockfree safely?

assume thread 1 log ("thread 1 info {}",1),thread 2 log ("thread 2 info {}, {}",2,3)

how to pack this into log interface with lock-free? a huge tuple?

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

1 participant