Threading

  • Thread starter Thread starter Steve Howard
  • Start date Start date
S

Steve Howard

I'm trying to get a handle on threading. I think I need to run my
text-to-speech code in a separate thread.

I looked at this example from Chris Tackle,
http://www.danielmoth.com/Blog/2004/11/dont-poll.html, which looks like it
should be just what I need. I tried to get it to work in VS 2005. I get the
error

Using the generic type 'System.Collections.Generic.Queue<T>' requires '1'
type arguments


I've tried Queue<string> , and bool, int ... and that gets by the first
error, but now I get

'System.Collections.Generic.Queue<string>' does not contain a definition for
'SyncRoot'


So i've tried other things ... int, object etc. I can't see a reference
anywhere that says what (if indeed anything) should be after Queue. As ever,
I must be missing something simple. I'd be grateful for any pointers.

Steve
 
That would be a sample by Daniel Moth, as somewhat alluded to by the site
URL. No idea who Chris Tackle is - maybe a brother of Fishing Tackle?

At any rate, I'd recommend doing work without generics so you're not trying
to understand both generics and threads at the same time. Generics are not
needed, and likely of little use for a specific problem. If you want to get
away from the cross-thread marshaling stuff you'll need, the
BackgroundWorkerThread of the SDF would help.

www.opennetcf.org/sdf

-Chris
 
That would be a sample by Daniel Moth, as somewhat alluded to by the site
URL. No idea who Chris Tackle is - maybe a brother of Fishing Tackle?

:-)

Sorry about that. Never was very good at names, even when they were right
there in front of me :-(
At any rate, I'd recommend doing work without generics so you're not
trying to understand both generics and threads at the same time. Generics
are not needed, and likely of little use for a specific problem. If you
want to get away from the cross-thread marshaling stuff you'll need, the
BackgroundWorkerThread of the SDF would help.

www.opennetcf.org/sdf


Thanks!

Since what I am working on today is designed as a proof-of-concept I can
afford to pass-by this at the moment. I'm up to my eyes in research and
code. I have a new project on the cards for next week which has to have this
particular issue resolved. I'll go back to it then. If you hear a scream
about Wednesday next week it's coz I still haven't worked it out :-)


Steve
 
Back
Top