Review of std.signal
Martin Nowak
code at dawg.eu
Thu Jan 23 14:55:46 PST 2014
On 01/23/2014 06:16 PM, Martin Nowak wrote:
> Of course there are a few implementation issues.
> - There is no WeakDelegate in druntime or phobos.
>
> Maybe requiring explicit disconnect is good enough?
>
> - The lifetime of the delegate context could be scoped.
>
> No idea how to solve this one, but you could require that
> the delegate context is on the GC heap.
>
> - When used this Signal definition requires boilerplate
> to restrict access to emit.
>
> This is unlucky but doesn't justify doubling the complexity
> of the module.
BTW, this is the reason why I didn't participate in the review.
We need to think harder about solving these issues without degrading the
API. I am simply lacking the time to get into this, but I'm sure
that a better trade-off can be found.
More information about the Digitalmars-d
mailing list