News for hackers. Stuff that matters.
Re:C/C++ vs. Rust Performance by dathinab on Sunday November 01, 2020 @01:19PM (#24961332)
Yes, also just after posting I noticed you can't have unsized values living across await in generators without some major changes or something.

The problem is that when you create a generator it doesn't yet know the unsized field it only knows it when creating it in a `poll` call. But it only will call poll after pinning the generator at which point you can't really grow the size of it for a bunch of reasons including that growing might move it in memory (realloc) which you can't due to self references...

So you would need the size of the generator when generating it.

Which could somewhat be possible but not really with current rust features, i.e. it would need a lot a special care.

There are no comments on this comment yet.