stackless coroutine could not be replace by a method call chain, it might have loop and branch etc.
On Sunday, June 16, 2024 at 12:08:27 PM UTC+8 Robert Engels wrote: > 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 <qq451...@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...@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 > > <https://groups.google.com/d/msgid/golang-nuts/1d0dd2db-8890-4adc-894b-40bf0b72c1e4n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > -- 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/eb039619-c626-4176-8c78-4974e2e9c8efn%40googlegroups.com.