d5 / tengo

A fast script language for Go
https://tengolang.com
MIT License
3.55k stars 303 forks source link

Go Routines within Tengo #335

Open jvegaseg opened 3 years ago

jvegaseg commented 3 years ago

Hello, first of all, congratulations for Tengo, it is a great work!!!

I am trying to evaluate if Tengo could reach my needs and I need an answer to this question:

Is there a way to launch go routines within Tengo?

What I need is:

1.- Within a Tengo function, call a function in GO in order to make some HTTP requests and returning the results to Tengo and execute a Tengo function in order to process the results. 2.- Tengo program should be running doing other things while HTTP requests are running. 3.- Could be several HTTP requests at same time.

Is that possible? If yes, please, show me guidelines in order to achieve it.

Regards,

geseq commented 3 years ago

No, I don't think you can do this. @d5 ?