• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

threads - interaction

 
Ranch Hand
Posts: 68
MyEclipse IDE PHP Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you explain the following sentences taken from kb page 747:
This design is not optimal because the user can't do anything while the machine
is busy and while there are other shapes to define. We need to improve the situation.
A simple solution is to separate the processes into two different threads, one of
them interacting with the user and another managing the hardware. The user thread
sends the instructions to the hardware thread and then goes back to interacting with
the user immediately. The hardware thread receives the instructions from the user
thread and starts directing the machine immediately. Both threads use a common
object to communicate, which holds the current design being processed.

The user sends instr. to hardware and then goes back to interacting with the user? Does it mean interact with other users? Is the idea of threads like ajax in javascript where a client request is send to the server, then other jobs are done by client and when the server finishes it calls the client (back)? So the client does not have to wait.

Is the operator the user? The other thread is the machine/hardware. The idea here is that there is no third object (like in the bank account example) right? Two threads need each other and interact.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic