Tasks running plenty of time

Having problems? Maybe others have had the same problem too. Post HouseBot technical issues here.
Post Reply
Pedromlo
Member
Posts: 12
Joined: Tue Sep 26, 2006 9:57 am
Location: Portugal

Tasks running plenty of time

Post by Pedromlo »

Hi,
I´m constructing my solution and i have a lot of tasks sending commands to the serial port.
When 2 or more tasks run at the same time, they take a lot of time to run.
For example a task that normally takes 1 second to execute, when executing with other it takes 20 or 30 seconds.
The problem is not on sending the commands because they hang before sending it.
Anyone can help?
Regards
ScottBot
Site Admin
Posts: 2787
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Each task runs in it's own thread, so generally tasks won't hold up other tasks. However, if the multiple tasks are all trying to control the same thing (like a particular Device Property) that may cause problems. When a Task changes a property value, it waits until the change is complete before continuing to the next item in the task list. If you have two tasks changing the same value at the same time, there may be a possibility that the execution is getting confused when waiting for the same property.
Scott
Post Reply