On 10/23/12 3:44 AM, Graydon Hoare wrote:
> On 12-10-21 09:50 PM, Benjamin Striegel wrote:
>> If it's not too much trouble, a complete example (using any one of the
>> proposed syntaxes) would be enlightening. I'm still having a hard time
>> imagining how OutOfKittens is defined, and how do_some_stuff et al
>> signal it in the first place, and how the input/output of OutOfKittens
>> can be utilized within the signalling function.
>
> Sure. Let's use a real case such as "trying to open a file that might be
> missing in the middle of a call to read_whole_file_str". This involves a
> few assumed changes to the way io is structured, but nothing deep:
>
> // Boilerplate for declaring TLS key
> fn missing_file_key(_x: @Handler<Path,Reader>) { }
I do not understand this line.
> const missing_file : Condition<Path,Reader> =
> Condition { key: missing_file_key };
I have a little trouble parsing this line in which Condition appears
both as a type name and as a constructor. Nothing fatal, but it might be
a little difficult on end users.
>
> mod io {
[...]
> }
>
> Clear enough?
Looks good to me, and I appreciate the demonstration that we can
effectively write the definition of handlers after the protected code,
at least as a coding convention.
Cheers,
David
--
David Rajchenbach-Teller, PhD
Performance Team, Mozilla
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
