Re: Discouraging use of sync APIs
- From: Ondrej Holy <oholy redhat com>
- To: Debarshi Ray <rishi is lostca se>
- Cc: desktop-devel-list <desktop-devel-list gnome org>
- Subject: Re: Discouraging use of sync APIs
- Date: Mon, 9 Feb 2015 06:52:13 -0500 (EST)
----- Original Message -----
On Mon, Feb 09, 2015 at 10:47:37AM +0000, Philip Withnall wrote:
I guess there are two approaches: making async APIs easier to use; and
discouraging use of sync ones. I think the GAsyncResult framework we?ve
got is pretty good, and I can?t think of a way to simplify it.
One convention that I like is to use a _sync suffix for sync APIs,
instead of an _async suffix for async ones, because it lets me spot
synchronous calls with grep.
A little sad that there are things like g_file_read that are sync, not
async.
We already have g_file_read_async, it was probably typo, however I wonder which methods doesn't have async
versions? Would be probably good start to implemented them if there are any.
Regards
Ondrej
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]