Skip to content

Instantly share code, notes, and snippets.

@KhomDrake
Last active March 7, 2022 00:58
Show Gist options
  • Save KhomDrake/bddb7f994f726a8f29452b0843f0b85a to your computer and use it in GitHub Desktop.
Save KhomDrake/bddb7f994f726a8f29452b0843f0b85a to your computer and use it in GitHub Desktop.
mathScope.launch {
if(mathScope.ensureActive()) { // ensures that the scope is active and if not, it will throw a exception.
// continue the calculation
}
if(mathScope.isActive) { // returns true or false if the scope is active or not
// continue the calculation
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment