Re: Bug in generator

2017-01-30 Thread ag0aep6g via Digitalmars-d-learn
On 01/30/2017 11:58 AM, Profile Anaysis wrote: Also, if one tries to create a global generator an error about PAGESIZE not being a compile time value is given. That means you can't initialize it statically, because PAGESIZE is not known statically. But you can have a global (module scope,

Re: Bug in generator

2017-01-30 Thread ag0aep6g via Digitalmars-d-learn
On 01/30/2017 11:58 AM, Profile Anaysis wrote: the code from https://dlang.org/library/std/concurrency/generator.html gives a seg fault at the end. import std.concurrency; import std.stdio; void main() { auto tid = spawn( { while (true) {

Bug in generator

2017-01-30 Thread Profile Anaysis via Digitalmars-d-learn
the code from https://dlang.org/library/std/concurrency/generator.html gives a seg fault at the end. import std.concurrency; import std.stdio; void main() { auto tid = spawn( { while (true) { writeln(receiveOnly!int()); } }); auto r = new