For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).
get_safe_task_id
get_safe_task_id(ctx: DeviceContextPtr) -> OptionalReg[Int]
Safely extract task_id from DeviceContextPtr, returning None if null/invalid.
Args:
- ctx (
DeviceContextPtr): The device context pointer to extract the task ID from.
Returns:
OptionalReg[Int]: An OptionalReg containing the task ID if valid, None otherwise.
get_safe_task_id(ctx: DeviceContext) -> OptionalReg[Int]
Safely extract task_id from DeviceContext, returning None if null/invalid.
Args:
- ctx (
DeviceContext): The device context to extract the task ID from.
Returns:
OptionalReg[Int]: An OptionalReg containing the task ID if valid, None otherwise.