Need help with concurrent task:

I failed to create a concurrent task that takes 2 parameters and return a value. Can anyone help?

async fn task1(a: Int, b: String) -> List [UInt256]:
    return []

fn main() raises:        
    var tg = TaskGroup()
    tg.create_task(task1(1, "Hi"))
    tg.wait()
error: invalid call to 'create_task': failed to infer implicit parameter 'origins' of argument 'task' type 'Coroutine'
    tg.create_task(task1(1, "Hi"))
    ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~

async in Mojo is not currently in a usable state. The syntax works, but there are many, many, many things which do not work properly.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.