tackle icon indicating copy to clipboard operation
tackle copied to clipboard

Async Hook Calls

Open robcxyz opened this issue 1 year ago • 0 comments

Async Hook Calls

Add async functionality to the parser

  • Proposal Status: wip

  • Issue Number: 226

  • Proposal Doc: async.md

Overview

Would be cool to implement async functionality but would need another arrow to define the hook as being awaitable.


Greeter<-:

  target: str

  args: ['target']

  exec:

    print->: Hello {{target}}



tasks:

  - =>: Greeter world!

  - =>: Greeter earth!

  - =>: Greeter universe!



call->: await gather **tasks

Hooks are built via a partial method on the model which would need to be redefined via some async partial wrapper. Would need to move the partial method potentially

robcxyz avatar Dec 31 '23 21:12 robcxyz