Re: io assumptions

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Thu, 05 Dec 2002 02:38:04 +0100

Not sure how you end up in this.

Either the open/create is syncronous, in which case NULL should be
returned, or it is asyncronous and there won't be a close callback until
the event queues are polled, which they won't be while the return is
executing as there is a single main thread in Squid..

Regards
Henrik

Robert Collins wrote:
>
> Just a warning: the store IO open and create callers assume that if a
> non null pointer is returned, then the object will not have called it's
> close callback yet. This is a) potentially false given a really weird
> scheduling event and something like overlapped IO. And b) duplication of
> effort (for async opens, it means we will fail if we can't queue the
> request, or if the open fails - and the caller is given the
> responsiblity to handle that difference. A cleaner design IMO would be a
> single failure mode - we queue the open in store_swapin, and if the open
> fails (sync or async) we get called back. If the open succeeds, we get a
> separate callback with the newly created object.
>
> This is a note for any interested hacker, not something I will be
> addressing anytime soon.
>
> Rob
>
> ------------------------------------------------------------------------
> Name: signature.asc
> signature.asc Type: application/pgp-signature
> Description: This is a digitally signed message part
Received on Wed Dec 04 2002 - 18:38:35 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:00 MST