[Tarantool-patches] [PATCH 12/13] coio: add *_noxc read / write functions

Alexander Turenko alexander.turenko at tarantool.org
Sun Apr 12 15:51:02 MSK 2020


On Fri, Apr 10, 2020 at 11:05:13AM +0300, Konstantin Osipov wrote:
> * Alexander Turenko <alexander.turenko at tarantool.org> [20/04/10 09:28]:
> > The popen implementation is written in C and uses coio read / write
> > functions. If an exception occurs, it'll pass through the C code. It
> > should be catched to proceed correctly.
> > 
> > We usually have foo() and foo_xc() (exception) functions when both
> > variants are necessary. Here I added non-conventional *_noxc() functions
> > as the temporary solution to postpone refactoring of the code and all
> > its usages.
> > 
> > Part of #4031
> > ---
> >  src/lib/core/coio.cc | 39 +++++++++++++++++++++++++++++++++++++++
> >  src/lib/core/coio.h  | 41 +++++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 80 insertions(+)
> > 
> > diff --git a/src/lib/core/coio.cc b/src/lib/core/coio.cc
> > index 74e6240ce..6a113aa47 100644
> > --- a/src/lib/core/coio.cc
> > +++ b/src/lib/core/coio.cc
> > @@ -381,6 +381,26 @@ coio_readn_ahead_timeout(struct ev_io *coio, void *buf, size_t sz, size_t bufsiz
> >  	return nrd;
> >  }
> >  
> > +/*
> > + * FIXME: Rewrite coio_read_ahead_timeout() w/o C++ exceptions and
> > + * drop this function.
> > + */
> 
> Ugh.
> 
> Why can't you do it instead? This is necessary for a lot of other
> patches, I believe Georgy's patches are doing it as well.

Filed https://github.com/tarantool/tarantool/issues/4881

WBR, Alexander Turenko.


More information about the Tarantool-patches mailing list