Commit Graph

10 Commits (59f28e92cbfd5b534bc5788a2b2c6be8bd258610)

Author SHA1 Message Date
edef 59f28e92cb Ensure that the closure outlives the generator [breaking-change]
Previously, it was possible to cause unsafety by having the closure
refer to values with lifetimes that weren't enclosed by the generator's
lifetime.
2016-09-22 14:03:46 -04:00
Amanieu d'Antras fff625767c Clean up and simplify the implementation of generators 2016-09-09 10:59:35 -04:00
edef bbfa5a43bc add regression test for #31 2016-08-30 18:26:42 -04:00
whitequark 5a77a01863 Implement OwnedStack. 2016-08-30 12:20:34 -04:00
whitequark 4b32c18f70 Rename Yielder::generate to Yielder::suspend.
This makes more sense, because "generate" implies *running*
a generator, not *returning* from a generator. That name was
a vestige of the time when libfringe only really provided a .next()
implementation, which made marginally more sense together with
.generate(), but it doesn't anymore when we have .resume().
2016-08-30 12:20:34 -04:00
edef f21b8dc936 Update the license headers for MIT/Apache 2016-08-20 23:45:01 +02:00
whitequark f8cf95f686 Implement SliceStack. 2016-08-19 15:12:42 +02:00
whitequark ddbf9a5afe Reimplement Generator to pass both input and output values around. 2016-08-13 13:38:04 +02:00
whitequark a5d3430e63 Make Generator safe in presence of destructors. 2016-08-13 13:38:04 +02:00
whitequark 7ffad26cfd Implement the safe Generator abstraction.
close #24
2016-07-17 13:55:56 -04:00