From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id A66A54696C3 for ; Fri, 10 Apr 2020 11:05:15 +0300 (MSK) Received: by mail-lj1-f194.google.com with SMTP id k21so1185138ljh.2 for ; Fri, 10 Apr 2020 01:05:15 -0700 (PDT) Date: Fri, 10 Apr 2020 11:05:13 +0300 From: Konstantin Osipov Message-ID: <20200410080513.GA32010@atlas> References: <328813debe7020378d0faa79bc3eee8cd00f6197.1586486220.git.alexander.turenko@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <328813debe7020378d0faa79bc3eee8cd00f6197.1586486220.git.alexander.turenko@tarantool.org> 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: Alexander Turenko Cc: tarantool-patches@dev.tarantool.org * 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. -- Konstantin Osipov, Moscow, Russia