From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp3.mail.ru (smtp3.mail.ru [94.100.179.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 2DECB4696C3 for ; Sun, 12 Apr 2020 15:51:06 +0300 (MSK) Date: Sun, 12 Apr 2020 15:51:02 +0300 From: Alexander Turenko Message-ID: <20200412125102.3rje6edcbuf3kans@tkn_work_nb> References: <328813debe7020378d0faa79bc3eee8cd00f6197.1586486220.git.alexander.turenko@tarantool.org> <20200410080513.GA32010@atlas> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200410080513.GA32010@atlas> Subject: Re: [Tarantool-patches] [PATCH 12/13] coio: add *_noxc read / write functions List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Konstantin Osipov Cc: tarantool-patches@dev.tarantool.org On Fri, Apr 10, 2020 at 11:05:13AM +0300, Konstantin Osipov wrote: > * Alexander Turenko [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.