async: context: use new_bus by default
There are two primary methods for creating a generic bus:
* new_default
* new_bus
The "default" methods use TLS to get a shared bus for the thread. This
is likely not the desired bus to use for async operations because:
1. Currently a separate thread is used for the message processing.
2. Some existing synchronous code throughout openbmc uses
`new_default` instead of referencing an existing bus, which could
interfere with the async context.
Switch to using `new_bus` by default to ensure we get a fresh, unused
and unshared bus in the typical case.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I1fd27de7bce9a8737294a5ab8e63e0dbe1afc8c3
diff --git a/include/sdbusplus/async/context.hpp b/include/sdbusplus/async/context.hpp
index 05994c9..e60dccf 100644
--- a/include/sdbusplus/async/context.hpp
+++ b/include/sdbusplus/async/context.hpp
@@ -40,7 +40,7 @@
class context : public bus::details::bus_friend
{
public:
- explicit context(bus_t&& bus = bus::new_default());
+ explicit context(bus_t&& bus = bus::new_bus());
context(context&&) = delete;
context(const context&) = delete;