upgraded to run in parallel
This commit is contained in:
@ -134,7 +134,7 @@
|
||||
"control.panic": "Display an error code and stop the program.",
|
||||
"control.panic|param|code": "an error number to display. eg: 5",
|
||||
"control.reset": "Reset the device.",
|
||||
"control.runInBackground": "Run other code in the background.",
|
||||
"control.runInParallel": "Run other code in the parallel.",
|
||||
"control.waitForEvent": "Blocks the calling thread until the specified event is raised.",
|
||||
"control.waitMicros": "Block the current fiber for the given microseconds",
|
||||
"control.waitMicros|param|micros": "number of micro-seconds to wait. eg: 4",
|
||||
|
@ -25,7 +25,7 @@
|
||||
"control.onEvent|block": "on event|from %src|with value %value",
|
||||
"control.panic|block": "panic %code",
|
||||
"control.reset|block": "reset",
|
||||
"control.runInBackground|block": "run in background",
|
||||
"control.runInParallel|block": "run in parallel",
|
||||
"control.waitForEvent|block": "wait for event|from %src|with value %value",
|
||||
"control.waitMicros|block": "wait (µs)%micros",
|
||||
"control|block": "control",
|
||||
|
8
libs/base/shims.d.ts
vendored
8
libs/base/shims.d.ts
vendored
@ -118,11 +118,11 @@ declare namespace control {
|
||||
function waitMicros(micros: int32): void;
|
||||
|
||||
/**
|
||||
* Run other code in the background.
|
||||
* Run other code in the parallel.
|
||||
*/
|
||||
//% help=control/run-in-background blockAllowMultiple=1 afterOnStart=true
|
||||
//% blockId="control_run_in_background" block="run in background" blockGap=8 shim=control::runInBackground
|
||||
function runInBackground(a: () => void): void;
|
||||
//% help=control/run-in-parallel handlerStatement=1
|
||||
//% blockId="control_run_in_parallel" block="run in parallel" blockGap=8 shim=control::runInParallel
|
||||
function runInParallel(a: () => void): void;
|
||||
|
||||
/**
|
||||
* Blocks the calling thread until the specified event is raised.
|
||||
|
Reference in New Issue
Block a user