Click here to Skip to main content
15,912,069 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Question: I know reflection is powerful - but just how powerful? Pin
Julien22-Oct-08 17:25
Julien22-Oct-08 17:25 
GeneralRe: Question: I know reflection is powerful - but just how powerful? Pin
Dave Kreskowiak23-Oct-08 1:55
mveDave Kreskowiak23-Oct-08 1:55 
Question"File exists" error Pin
kozu22-Oct-08 5:46
kozu22-Oct-08 5:46 
AnswerRe: "File exists" error Pin
Simon P Stevens22-Oct-08 5:58
Simon P Stevens22-Oct-08 5:58 
QuestionPowerShell scripting Pin
SNI22-Oct-08 1:14
SNI22-Oct-08 1:14 
AnswerRe: PowerShell scripting Pin
Simon P Stevens22-Oct-08 6:03
Simon P Stevens22-Oct-08 6:03 
AnswerRe: PowerShell scripting Pin
Dave Kreskowiak22-Oct-08 6:39
mveDave Kreskowiak22-Oct-08 6:39 
QuestionRunning code on a specific thread Pin
Simon P Stevens21-Oct-08 23:53
Simon P Stevens21-Oct-08 23:53 
I have a bit of hardware that has the strange requirement that all access to it must occur on the same thread that it was initialised on.

(Kind of like GUI controls do)

What I'm looking for is a way of creating a thread and then making sure that any methods that access the hardware get transferred to run on that thread.

I tried creating a thread and creating a dispatcher[^] for the thread, but as soon as the thread has no more work to do, it stops. But if I keep the thread alive by doing an idle loop and some sleeps, the methods queued on the dispatcher never get processed. Is there some way I can keep a thread idle and get it to process it's dispatcher queue when something gets added.

Or is there another class that I can use to archive this?

I could write my own, A simple list<Action> that the methods could be added to, and a thread that just loops round, executes the actions and removes them from the list.

(I don't need code samples, or urgent codez Laugh | :laugh: , just a few pointers if anything like this already exists in the framework, or if I should just write my own)

Simon

AnswerRe: Running code on a specific thread Pin
led mike22-Oct-08 5:24
led mike22-Oct-08 5:24 
GeneralRe: Running code on a specific thread Pin
Simon P Stevens22-Oct-08 5:44
Simon P Stevens22-Oct-08 5:44 
GeneralRe: Running code on a specific thread Pin
led mike22-Oct-08 7:09
led mike22-Oct-08 7:09 
JokeRe: Running code on a specific thread Pin
Simon P Stevens22-Oct-08 21:45
Simon P Stevens22-Oct-08 21:45 
AnswerRe: Running code on a specific thread Pin
Mark Salsbery22-Oct-08 5:58
Mark Salsbery22-Oct-08 5:58 
GeneralRe: Running code on a specific thread Pin
Simon P Stevens22-Oct-08 6:04
Simon P Stevens22-Oct-08 6:04 
QuestionIs “windowsbase.dll” part of any of the version of .net framework Pin
Mushtaque Nizamani21-Oct-08 19:41
Mushtaque Nizamani21-Oct-08 19:41 
AnswerRe: Is “windowsbase.dll” part of any of the version of .net framework Pin
Mark Salsbery21-Oct-08 20:42
Mark Salsbery21-Oct-08 20:42 
GeneralRe: Is “windowsbase.dll” part of any of the version of .net framework Pin
Mushtaque Nizamani22-Oct-08 22:48
Mushtaque Nizamani22-Oct-08 22:48 
AnswerRe: Is “windowsbase.dll” part of any of the version of .net framework Pin
Dave Kreskowiak22-Oct-08 5:09
mveDave Kreskowiak22-Oct-08 5:09 
GeneralRe: Is “windowsbase.dll” part of any of the version of .net framework Pin
Mark Salsbery22-Oct-08 5:54
Mark Salsbery22-Oct-08 5:54 
GeneralRe: Is “windowsbase.dll” part of any of the version of .net framework Pin
Dave Kreskowiak22-Oct-08 11:13
mveDave Kreskowiak22-Oct-08 11:13 
GeneralRe: Is “windowsbase.dll” part of any of the version of .net framework Pin
Pete O'Hanlon22-Oct-08 11:32
mvePete O'Hanlon22-Oct-08 11:32 
GeneralRe: Is “windowsbase.dll” part of any of the version of .net framework Pin
Thomas Stockwell24-Oct-08 4:17
professionalThomas Stockwell24-Oct-08 4:17 
GeneralRe: Is “windowsbase.dll” part of any of the version of .net framework Pin
Mushtaque Nizamani22-Oct-08 22:57
Mushtaque Nizamani22-Oct-08 22:57 
GeneralRe: Is “windowsbase.dll” part of any of the version of .net framework Pin
Pete O'Hanlon23-Oct-08 0:41
mvePete O'Hanlon23-Oct-08 0:41 
GeneralRe: Is “windowsbase.dll” part of any of the version of .net framework Pin
Mushtaque Nizamani23-Oct-08 0:44
Mushtaque Nizamani23-Oct-08 0:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.