std.pattern..mixin temptes..std.concurrency
BLS
windevguy at hotmail.de
Thu Jul 8 17:16:05 PDT 2010
On 09/07/2010 01:04, Andrei Alexandrescu wrote:
> I think Observer is a very difficult pattern to make generic. There's
> very much variability. Here's an article I wrote about it:
>
> http://docs.google.com/viewer?url=http://erdani.com/publications/cuj-2005-04.pdf
>
>
> http://docs.google.com/viewer?url=http://erdani.com/publications/cuj-2005-06.pdf
>
>
>
> Andrei
OK, got the message, Still not a Murder-Death-Kill argument.
The biggest problem I (just me) see is, to push or to pull.
I am not kidding. Using std.concurreny for message passing, the thing is
quit clear.. and anyway pull is sometimes too late, and furthermore hard
to make thread safe.
In example ..
I am watching a list [] Whenever the list class gets an delete, insert,
update event it triggers the delegate , no problem so far, even if I
want to know which data was added, respective deleted.
My (without std.concurrency message passing)
void delegate(const ref msg) callback;
callback[] CallBack;
is keeping me informed ..
struct Message {T}{
T data;
string msg;
}
BUT What if I add a list to my list ?
...if we have a look at std.concurrency receive(), things are more
shiny.. what do you think Andrei ?
bjoern
More information about the Digitalmars-d
mailing list