We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If multiple producers are employed, it could lead to a blockage at the location of the following code:
https://github.com/Squadrick/shadesmar/blob/master/include/shadesmar/pubsub/topic.h#L136
Below is my test code
struct stu { int a = 0; char b[10] = {0}; }; int test() { auto sp_pub = make_shared<Publisher>("test_shared_topic"); if (!sp_pub) { return -1; } int i = 0; while(true) { struct stu s; s.a = i++; string str = to_string(i); strncpy(s.b, str.c_str(), str.length()); bool ret = sp_pub->publish(reinterpret_cast<void*>(&s), sizeof(stu)); if (!ret) { cout << "publish error" << endl; } this_thread::sleep_for(chrono::milliseconds(1)); } return 0; }
I spawn multiple processes to execute the above code.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
If multiple producers are employed, it could lead to a blockage at the location of the following code:
https://github.com/Squadrick/shadesmar/blob/master/include/shadesmar/pubsub/topic.h#L136
Below is my test code
I spawn multiple processes to execute the above code.
The text was updated successfully, but these errors were encountered: