Re: Discouraging use of sync APIs



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.

Cheers,
Debarshi


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]