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
Hi,
I'm currently having an issue when creating simppl::dbus::Skeleton instances from a thread.
A thread different then the dispatcher thread.
This results in SIGSEGV.
I've written a unittest to show the use case.
#include <gtest/gtest.h> #include "simppl/skeleton.h" #include "simppl/dispatcher.h" #include "simppl/interface.h" #include <thread> constexpr const char* bus = "bus:session"; constexpr const char* name = "com.dummy"; constexpr const char* path = "/com/dummy/"; INTERFACE(Dummy) { Property<int> Test; Dummy() : INIT(Test) { } }; int index_ = 0; class DummyService : public simppl::dbus::Skeleton<Dummy> { public: DummyService(simppl::dbus::Dispatcher& d) : simppl::dbus::Skeleton<Dummy>(d, name, "/dummy/" + std::to_string(index_++)) { } }; using namespace std::chrono_literals; TEST(Crash, crash) { simppl::dbus::Dispatcher d(bus); DummyService service1(d); DummyService service2(d); std::thread thread1 = std::thread([&d] { std::this_thread::sleep_for(2000ms); DummyService service3(d); }); d.run(); }
The text was updated successfully, but these errors were encountered:
simppl is by default not intended to serve services in multiple threads. Sorry.
Sorry, something went wrong.
No branches or pull requests
Hi,
I'm currently having an issue when creating simppl::dbus::Skeleton instances from a thread.
A thread different then the dispatcher thread.
This results in SIGSEGV.
I've written a unittest to show the use case.
The text was updated successfully, but these errors were encountered: