Thread communication
thedeemon via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Aug 5 04:10:40 PDT 2015
On Tuesday, 4 August 2015 at 15:19:51 UTC, Chris wrote:
> I want to stop (and abort) the worker as soon as new input
> arrives. However, while executing the function that contains
> the foreach-loop the worker thread doesn't listen, because it's
> busy, of course.
I think this is a matter of architecture. If you want to use
message-passing and you want the worker to react quickly to new
events, this means it needs to check for new messages (via
receiveTimeout) often enough, there's no way around it.
More information about the Digitalmars-d-learn
mailing list