{"id":"word--stop","name":"stop","owner":"yeho","package":"language","kind":"keyword","signature":"stop","description":"Request task cancellation","context":"Use the narrowest wait that explains progress. Treat stop as a lifecycle request, not proof that cleanup already finished.","parameters":[],"returns":"","members":[],"tags":["concurrency","cpu","keyword","language","yeho"],"updated":"2026-09-09","source":{"repository":"yeho","path":"parser_statements.cpp parseWaitStatement; errors-tasks-effects fixtures"},"status":"experimental","notes":["Supported duration units are target-validated.","parallel failure and cleanup semantics are covered by dedicated fixtures, but the feature is experimental."],"examples":[{"id":"complete","title":"Complete program","description":"Coordinate CPU tasks explicitly. Cancellation is a request; a short task may finish first.","code":"// task is the supported CPU concurrency unit; thread syntax is unavailable.\nCount() -> int { return 42 }\ntask of int worker = task Count()\nstop worker\nwait until worker.finished\nConsole.Log(Text.From(worker.cancelled))\nparallel\n{\n    Console.Log(\"Preparing textures\")\n    Console.Log(\"Preparing audio\")\n}\n","tags":["cpu","language"],"run":"cpu-oracle","expected":null,"verifyRun":false,"manifest":"manifestVersion = \"2\"\npackage = \"api.example.word__stop\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n","verification":"type checked","sha256":"b50e1b426d02f59e7a245353de8593f47dd47e23c785e64228334b50eb15f52b","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=word--stop","json":"https://demonhunterlabs.com/reference/items/word--stop.json","markdown":"https://demonhunterlabs.com/reference/text/word--stop.md"}
