Results 1 to 2 of 2
  1. #1
    raghuylin is offline Member
    Join Date
    Oct 2008
    Rep Power

    Default Help of Thread and some Algorithm

    Hi Friends,

    I need to write an algorithm (formula) for one of my program, the logic is below.

    I have a thread running and it receives a dynamic double value which may range between 1 - 10 or 1 - 20. ( These range are known before i.e we will set the minimum and maximum dynamic value as constant). Now i need a logic like when this dynamic value is 1 (minimum value) my thread should run in minimum speed ( i.e sleep for 1000 milli sec), or if my dynamic value is 10 (20) (maximum value) my thread should run in maximum speed(i.e sleep for 200 milisec). This minimum and maximum speed of thread is also set before in a constant. the dynamic value may change @ any time between the range we have set. Please help me to produce a algorithm or formula for this. Thanks in advance


  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power


    If we do your HW how are you going to exercise your brain enough to learn how to program?

    Do some work on this and comeback when you get stuck.

Similar Threads

  1. how high-priority thread allow other thread
    By rameshkr in forum Threads and Synchronization
    Replies: 4
    Last Post: 10-15-2009, 10:46 PM
  2. passing a value from parent thread to child thread
    By sachinj13 in forum Threads and Synchronization
    Replies: 7
    Last Post: 09-07-2008, 09:06 PM
  3. data from the main/GUI thread to another runnin thread...
    By cornercuttin in forum Threads and Synchronization
    Replies: 2
    Last Post: 04-23-2008, 10:30 PM
  4. Replies: 0
    Last Post: 01-28-2008, 07:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts