Hosting user controls on a separate thread.

F

Frosty Madness

I'm writing a plugin framework where users create their own UI plugins.
I would like to have each usercontrol running on a separate thread, so
that if a plugin writer writes some bad blocking code, it doesn't lock
up the whole app, just their control.

Is this possible?

Jack
 
D

Daniel Moth

In theory you could but then you would have to restrict *all* access to the
control to be from that thread - unrealistic for a UI element that no doubts
interacts with its container etc.

In practise, all UI elements must be created on the UI thread (the one from
Application.Run) and then accessed on that thread (or via Control.Invoke
from others)...

Cheers
Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top