Note that there are some explanatory texts on larger screens.

plurals
  1. POC# MEF: Threadsafe Export
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. CO"Thread-safe connection to object"? There is absolutely no golden hammer for threading - especially one reliable enough for Microsoft to provide as part of MEF. Using `[PartCreationPolicy(CreationPolicy.NonShared)]` would give each object a unique instance (which is 'more' thread safe if used correctly). This is going to sound rude - but it's honestly good avice: go and make an effort to learn why this won't work and you will understand enough about threading to actually use it. Simple answer - `[Import]` the objects and `lock` them as always.
      singulars
    2. COAs explicit as proposing a solution, and then suggesting I learn more why "this" wont work is, I understand the problems of making something threadsafe; my question, I suppose, didn't fully illuminate my proposed algorithm.
      singulars
    3. COThere's a collection of objects. Each object has a ConcurrencyQueue (this is already threadsafe) associated with it. When a plugin requests access to the object, it's given a copy of the object which dumps messages directly into the queue. At my leisure, I process all requests currently in the queue. The objects given to plugins are/can be in separate threads, however the queue and everything else in the CarSystem are running in one. In this manner I intend to circumvention any thread conflicts. My question was: how can I create a simple custom export provider which would allow me to do this.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload