Blocking/nonBlocking

Which commands are blocking and which are non-blocking? Is there an easy way to figure it out.

1 Like

I guess only the move motor a specific amount ones, but you can always add the “and don’t wait” by clicking the arrow at the far right of the block to make it non-blocking.

1 Like

“and don’t wait” is for V5 blocks

Some non blocking commands are:
Motor.spin();
Motor.startRotateFor();
Motor.startRotateTo();

Some blocking commands are:
Motor.rotateFor();
Motor.rotateTo();
(assuming you don’t add a false at the end of each statement)

The 2 blocking commands will be the two most used ones while the rest of the commands are non blocking

2 Likes

yes, but I’d like to add that startRotateFor and startRotateTo are being deprecated - it is suggested that people instead include the boolean parameter for if the command is blocking. Fewer and fewer new features will use the 'start’s.

3 Likes