fn: console.lock
[contents]

Contents

Syntax

The syntax for console.lock calls is:

f++:  
console.lock

n++:  
@console.lock

Description

The console.lock function is for preventing other threads from outputting to the console, it takes zero parameters.

If the console is locked without being unlocked then it will be automatically unlocked and an error will be thrown with your file failing to build or script failing.

Note: If a thread building another page attempts to output to the console while it is locked the thread will stall until the console becomes available again, which can slow down build times.

f++ example

Example of console.lock being used with f++:

console.lock
console("hello, world!")
console.unlock

n++ example

Example of console.lock being used with n++:

@console.lock
@console("hello, world!")
@console.unlock