Skip to content

Feature: Async #9

Description

@PokeJofeJr4th

Asynchronous Functions

Asynchronous functions synchronise with each other. They take turns running lines of code.

async funct count() {
   print(2)!
   print(4)!
}

count()!
print(1)!
print(3)!
print(5)!

You can use the noop keyword to wait for longer before taking your turn.

async func count() {
   print(2)!
   noop!
   print(5)!
}

count()!
print(1)!
print(3)!
print(4)!

Note: In the program above, the computer interprets noop as a string and its sole purpose is to take up an extra line. You can use any string you want.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions