the COM apartment of one object - a device or a whole driver: its thread creates the object, runs its steps and releases it
More...
|
| template<typename... args_t> |
| | apartment (args_t &&... args) |
| | the constructor returns once the thread holds the apartment and the object, built from the arguments, stands
|
| | dx_catchall (return false;) void sleep() |
| | operator object_t & () const noexcept |
| template<typename args_t> |
| void | operator<< (args_t &args) |
| | a parser's face, where the object has one: only the args cross to the thread
|
| void | quiet () noexcept try |
| bool | try_conclude () noexcept try |
| bool | try_launch () |
| void | wake () |
| | ~apartment () |
| | the object concludes and goes on the thread that created it; a destructor running on that thread itself lets it run out detached
|
template<typename object_t, ::COINIT model = COINIT_APARTMENTTHREADED>
class dx::apartment< object_t, model >
the COM apartment of one object - a device or a whole driver: its thread creates the object, runs its steps and releases it
An apartment threaded in-proc server whose interface carries no marshaller is bound to the thread that created it, so an object built on such a server exists only for as long as that thread holds the apartment; and the multithreaded apartment lives for as long as some thread holds it. The apartment is held wherever the object would be: a driver's map holds a device's apartment and hands out the device aliased to it, a harness holds a driver's apartment and parses through it. Only data crosses the thread boundary - the constructor's arguments, a parser's args - never a call-in gateway.
The rendezvous of every step belongs to whoever hands it over, so the thread touches nothing of this object once a step returned - a step may have released the last reference to it.
- Exceptions
-
| Whatever | creating the object or a step throws, rethrown on the thread that asked for it. |