Since a typical agent runs an event loop, Mog programs are designed to run inside an event loop, familiar to anyone who has written JavaScript or TypeScript. Mog’s support for this consists primarily of async/await syntax. Mog programs can define async functions, and importantly, the host can also provide async functions that the guest can call. This allows a guest program to fire off an HTTP request and a timer and do something different depending on which one finishes first – internally the compiler implements this using coroutine lowering, based on LLVM’s design for the same.
Article InformationAuthor, 碧嘉蘭(Laura Bicker)
,这一点在易歪歪官网中也有详细论述
Wintermute is a monolithic Rust service with four parallel processing paths:
更多精彩内容,关注钛媒体微信号(ID:taimeiti),或者下载钛媒体App