From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Dietmar Maurer <dietmar@proxmox.com>
Cc: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>,
Dominik Csapak <d.csapak@proxmox.com>
Subject: Re: [pbs-devel] [RFC PATCH proxmox 1/4] proxmox-async: add SenderWriter helper
Date: Fri, 18 Feb 2022 16:27:55 +0100 [thread overview]
Message-ID: <20220218152755.4s5zdu7xutje7kxw@wobu-vie.proxmox.com> (raw)
In-Reply-To: <464675824.1190.1645169765999@webmail.proxmox.com>
On Fri, Feb 18, 2022 at 08:36:05AM +0100, Dietmar Maurer wrote:
> This can block the executor? If so, should we use block_in_place?
> Or does self.sender.blocking_send() consider that automatically?
The sender in this case is a thread. The tokio side is the receiver.
The type implements `Write` which is blocking by definition, adding a
`block_in_place` inside it is never correct.
If mixing of blocking/async code is really a concern (which I don't
think it is), I'd rather not expose `from_sender` (or under a different
name as an `unsafe fn`) and instead only have a function creating the
*tuple* of `(SenderWriter, Receiver)` with appropriate documentation
about the sync/async nature of the two sides.
But I don't think this is truly warranted.
next prev parent reply other threads:[~2022-02-18 15:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-18 7:36 Dietmar Maurer
2022-02-18 15:27 ` Wolfgang Bumiller [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-02-17 9:40 [pbs-devel] [RFC PATCH proxmox/proxmox-backup] implement streaming serialization for api calls Dominik Csapak
2022-02-17 9:40 ` [pbs-devel] [RFC PATCH proxmox 1/4] proxmox-async: add SenderWriter helper Dominik Csapak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220218152755.4s5zdu7xutje7kxw@wobu-vie.proxmox.com \
--to=w.bumiller@proxmox.com \
--cc=d.csapak@proxmox.com \
--cc=dietmar@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox