आरंभasync
Translation status: हिन्दी reader-locale proof. Term names and code fences follow the hi pack; supporting prose may still be English.
Declares the asynchronous program entry point.
Syntax: आरंभasync <block>
Category#
entry
Related#
Examples#
radix/corpus/incipiet/incipiet.fab (canonical · keyword)#
Declares the asynchronous program entry point.
# =============================================================================
# आरंभasync — Declares the asynchronous program entry point
# =============================================================================
#
# What this teaches:
# • Declares the asynchronous program entry point.
# • Related keywords: आरंभ, रुको_स्थिर, रुको
#
# Common mistakes:
# • Calling a `async` function without consuming its वादा; use
# `रुको_स्थिर`, `रुको_चर`, `रुको_लौटाओ`, or `रुको` inside an `आरंभasync`.
#
# See also: आरंभ, रुको_स्थिर, रुको
# =============================================================================
# आरंभasync — async program entry point
#
# आरंभasync { <body> }
#
# GRAMMAR:
# asyncEntry :← 'आरंभasync' block
#
# EXPECTED OUTPUT:
# none — Rust async runtime whitelist (compile-only in harness)
#
# BACKEND:
# Pairs with `async` and awaited bindings; contrast with आरंभ
# (synchronous entry).
# Helper async finite function
fn accipe() async → string {
# Simulates async finite operation
return "datum paratum"
}
fn metire(string datum) async → int {
return datum.length()
}
# Futura entry point
async_main {
print "incipiet initium"
# Await async functions with रुको_स्थिर
await_const string datum ← accipe()
print "acceptum: §"(datum)
await_const int longitudo ← metire(datum)
print "longitudo: §"(longitudo)
print "opus perfectum"
}Expected output:
incipiet initium
acceptum: datum paratum
longitudo: 13
opus perfectum