digitalmars.D.bugs - [Issue 16074] New: std.concurrency receive wont work
- via Digitalmars-d-bugs (35/35) May 25 2016 https://issues.dlang.org/show_bug.cgi?id=16074
https://issues.dlang.org/show_bug.cgi?id=16074 Issue ID: 16074 Summary: std.concurrency receive wont work Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: regression Priority: P1 Component: phobos Assignee: nobody puremagic.com Reporter: fiorentini gmail.com Hi guys, i noticed a strange compiler error when trying to use the std.concurrency receive. import std.stdio; import std.concurrency; import core.thread; void workerFunc() { receive( (int message) { writeln("Message ", message); } ); } void main() { auto worker = spawn(&workerFunc); worker.send(10); thread_joinAll(); } Trying to compile i got error "Error: function expected before (), not module receive of type void" Note: if i use receiveTimeout instead of receive there is no issue. I'm using dmd version 2.071.0 --
May 25 2016