I don’t think that is possible. You can have stackless coroutines, but if a coroutine has no state at all it would simply be implements as a method call chain without parameters in an executor. I doubt these are very useful. 

On Jun 15, 2024, at 10:08 PM, cheng dong <qq451954...@gmail.com> wrote:

ahh, i really want to say is, can golang offer user a stateless coroutine. 
On Saturday, June 15, 2024 at 11:16:02 PM UTC+8 cheng dong wrote:
sorry, i found that 500k stack size might be nesessary for a coroutine, so its not a problem.

On Saturday, June 15, 2024 at 10:24:18 PM UTC+8 cheng dong wrote:
maybe coroutine could be implented inside a g in future hopefully

On Saturday, June 15, 2024 at 10:23:01 PM UTC+8 cheng dong wrote:
thanks to runtime.newcoro/coroswitch and now we could do more things with coroutine. but it seems every newcoro create a full g which is 448B in size. maybe it is too heavy for a coroutine both in size and in schedule granularity ?

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/1d0dd2db-8890-4adc-894b-40bf0b72c1e4n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/628EAFA3-CA89-4B5F-B202-A8A11A6F95DA%40ix.netcom.com.

Reply via email to