{
"id": "fn-event-stop",
"dataComponent": "event",
"heading": {
"title": "stop",
"badges": ["Event", "Async"]
},
"synopsis": "Stops a previously scheduled repeating interval by its numeric handle. If no matching interval is found, it quietly does nothing.",
"codeBlocks": [
"extend(\"event\")\n\n# Typical usage => first schedule an interval:\n\nhandle = event:interval(1000, () => {\n sput(\"Tick.\")\n})\n\n# Then, to stop it:\nevent:stop(handle)\n\n# => The repeating calls end.\n\n# If you call event:stop(...) with a handle that doesn't exist or was already canceled, it does nothing.\n"
],
"notes": [
"Takes exactly one argument: the integer handle returned by event:interval(...).",
"Marks that interval as canceled. On the next poll cycle, it is removed from the event loop.",
"If the handle does not match any active intervals, nothing happens (no error).",
"Partial usage is generally not used for event:stop; it expects a single handle argument."
]
}