Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples with parallel approach. #94

Open
mradecki opened this issue Dec 29, 2016 · 1 comment
Open

Examples with parallel approach. #94

mradecki opened this issue Dec 29, 2016 · 1 comment
Assignees

Comments

@mradecki
Copy link
Contributor

mradecki commented Dec 29, 2016

Regarding fragment:

broadcastingObserver = ParallelBroadcastObserver( 
    DisplayingObserver(),
    StoringObserver(),
    CalculatingObserver())

sensor.FromNowOnReportTo(broadcastingObserver)

This is really cool concept. I just think it fits more in example about lifts. Being parallel while calling handlers for two values does not relly convince me, while being sequential with lowering lifts during fire alarm seems just crazy. For example:

var alarm
= new ParallelAlarm(
new AutoLift(),
new MechanicalLift(),
new ModernLift());

Now we can imagine that all lifts are handled parallely which should be expected in case of fire.

@grzesiek-galezowski
Copy link
Owner

Nice comment, I'll see what I can do about it, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants