How many threads are there in this situation.

  • Thread starter Thread starter Just Me
  • Start date Start date
J

Just Me

I'm trying to understand something in the Help that references threads and
need to know the following:

An application with a MDI window has 3 child windows.
Also the MDI window is parent to a couple of other (nonChild) windows.
Plus there is a window that is opened by a control on one of the nonChild
form.
Plus there is a window that is opened by a control on one of the Child form.


How many threads are there?
 
Just Me said:
I'm trying to understand something in the Help that references threads and
need to know the following:

An application with a MDI window has 3 child windows.
Also the MDI window is parent to a couple of other (nonChild) windows.
Plus there is a window that is opened by a control on one of the nonChild
form.
Plus there is a window that is opened by a control on one of the Child
form.


How many threads are there?

A single thread.
 
JustMe

One

And by clicking on whatever does the user get the action to the part of your
program.
Processing there goes mostly extremely fast.

Remember what is often forgotten.

A user uses normally only one keyboard, one mouse and has mostly only one
pair of eyes.

While when there where more threads accessing the sound it would probably
terrible.

I hope this gives a idea why I warn every time against overdone
multithreading.

Cor
 
MDI applications have multiple message pumps, but only one thread. As a
general rule a windows application should only have one thread that handles
keyboard/mouse input and display output. Additional threads are usually
only used when processing time would impact the responsiveness of the single
user interface thread. Cor is absolutely correct in stating that too much
threading is bad for an application - remember that each thread involves
system overhead for scheduling and resource management as well as generally
increased complexity in the application itself.

Mike Ober.
 
Thanks, some Help docs mentioned different behavior for multiple threads and
I wanted to know if which applied.
 

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

Back
Top