I think we can mark a class as Sync if ThreadingModel is Both or MTA, based on this sentence:
If you author a class that has ThreadingModel=Both or ThreadingModel=MTA, make sure that the class is thread-safe.
I think we can mark a class as Send if MarshallingBehavior is Agile, based on this sentence:
In the vast majority of cases, instances of Windows Runtime classes, like standard C++ objects, can be accessed from any thread. Such classes are referred to as "agile"
It would be great if someone with more understanding could confirm these assumptions.
I haven't fully understood the Windows Runtime threading model yet. We should probably mark generated class as
Send
and/orSync
based on theThreadingModel
andMarshallingBehavior
attributes. If I understand https://docs.microsoft.com/en-us/cpp/cppcx/threading-and-marshaling-c-cx?view=vs-2019 correctly, I think we could do the following:I think we can mark a class as
Sync
ifThreadingModel
isBoth
orMTA
, based on this sentence:I think we can mark a class as
Send
ifMarshallingBehavior
isAgile
, based on this sentence:It would be great if someone with more understanding could confirm these assumptions.
Related: #63, #18, #62, #60