You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RuntimeContext is a wrapper around RoInitialize and RoUninitialize, which initialize (and uninitialize) the WinRT runtime per thread.
Calling RoUninitialize from a different thread than RoInitialize is not allowed.
To fix this, we can replace the inner () with PhantomData<*mut ()>, which is also a zero-size type and (by virtue of containing a pointer) is not automatically Send and Sync. In the future (i.e. when more stuff is stablized), we can explicitly do impl !Send for RuntimeContext.
The text was updated successfully, but these errors were encountered:
Yup, I'll send something over when I get a chance -- ran across this while looking at the landscape for COM things in Rust, and haven't finished setting everything up yet (CoInitialize has the same issue, haha).
c.f. #18, I think that will require more reading / playing with types to get right. Worth doing, but needs more thought.
RuntimeContext
is a wrapper aroundRoInitialize
andRoUninitialize
, which initialize (and uninitialize) the WinRT runtime per thread.Calling
RoUninitialize
from a different thread thanRoInitialize
is not allowed.To fix this, we can replace the inner
()
withPhantomData<*mut ()>
, which is also a zero-size type and (by virtue of containing a pointer) is not automaticallySend
andSync
. In the future (i.e. when more stuff is stablized), we can explicitly doimpl !Send for RuntimeContext
.The text was updated successfully, but these errors were encountered: