Menu

#8 RotateMotor Exeption

compiler
closed-fixed
NXC (53)
5
2007-06-11
2007-04-16
Anonymous
No

#include "NXCDefs.h"

task thread1 ()
{
while(1==1)
{
RotateMotor(OUT_B,80,-45);
Wait(10);
RotateMotor(OUT_B,80,45);
}
}

task thread2 ()
{
while(1==1)
{
RotateMotor(OUT_C,100,-30);
Wait(10);
}
}

task main ()
{
Precedes(thread1,thread2);
}

thread2 terminates unexspectedy. The same thing happends with NBC

Discussion

  • John Hansen

    John Hansen - 2007-06-11
    • status: open --> closed-fixed
     
  • John Hansen

    John Hansen - 2007-06-11

    Logged In: YES
    user_id=661666
    Originator: NO

    Fixed in beta 29. Prior to that version the RotateMotor functions were not safe to call from concurrent threads.