Link to home
Start Free TrialLog in
Avatar of VanJava
VanJava

asked on

Mono Threading

What's the difference in terms of functions and coding between using a mono and multi threaded application if i want to calculate this:   y = 3x3 + 5x2 -10x + 10 (just an example)

Thank you.
Avatar of Mick Barry
Mick Barry
Flag of Australia image

none really. it would evaluated in a single thread.
Avatar of nullsquid
nullsquid

I believe threading is useful if your calculation needs to pause for another process at different stages. for example, if the sum was

y=(a very complicated calculation which requires disk access)+(another very complicated calculation which requires disk access)

you could thread each of the (very complicated calculation which requires disk access) such that as one of the processes was waiting for the disk access before it could proceed, the other one could be using the spare flops in the cpu. But for really simple things, no improvement would be seen with multithreading, indeed, it may even be slower.
Avatar of VanJava

ASKER

Can you please show me the codes using mono and multi threaded application to achive above calculation so i can run it and see  my self the effectiveness of both. Thanks
ASKER CERTIFIED SOLUTION
Avatar of pellep
pellep
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial