Bump -- Chandra Sekar.S
On Wed, Dec 7, 2016 at 10:24 AM, Chandru <chandru...@gmail.com> wrote: > I can understand db/sql using Context for cancellation. It is the optional > arguments to BeginContext like IsolationLevel and read-only flag, which are > not request-specific, that seem to contradict context's documentation. > > -- > Chandra Sekar.S > > On Tue, Dec 6, 2016 at 9:50 PM, <paraiso.m...@gmail.com> wrote: > >> Either the doc should be changed or the std lib should follow the spirit >> of the doc. But my understanding is that context.Context is not just about >> HTTP request/response cycle but deals with anything that needs cancellation >> or a resource clean up signal , some kind of DIY RAII . In any case the >> documentation should be clarified. >> >> Le mardi 6 décembre 2016 16:48:48 UTC+1, Chandra Sekar S a écrit : >>> >>> Documentation of the context package says, >>> >>> "Use context Values only for request-scoped data that transits processes >>> and APIs, not for passing optional parameters to functions." >>> >>> sql.BeginContext introduced in 1.8, uses Context to receive options like >>> IsolationLevel and read-only flag. These are neither request-specific nor >>> cross-cutting. They are options that are typically specific to a type of >>> operation, but common to all requests. >>> >>> Isn't this use in db/sql contradicting the recommendation in context's >>> doc? >>> >>> -- >>> Chandra Sekar.S >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "golang-nuts" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to golang-nuts+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.