Page 1 of 1

Tasks running plenty of time

Posted: Sat Nov 25, 2006 6:42 pm
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

Posted: Sat Nov 25, 2006 9:48 pm
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.