Skip site navigation (1) Skip section navigation (2)

libpq, blocking/nonblocking mechanism

From: Volkan YAZICI <volkan(dot)yazici(at)gmail(dot)com>
To: PostgreSQL Interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: libpq, blocking/nonblocking mechanism
Date: 2005-05-28 20:34:20
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces

While I'm trying to figure out the point of PQsetnonblocking() call,
confused so much on blocking/nonblocking mechanism.

Sync. Connect » Async. Query
Async. Connect » Sync. Query

Both of above flows work without any PQsetnonblocking() call.
Therefore sync/async connection and sync/async query execution are not
dependent to each other. (Right?) If so, what's the point of
PQsetnonblocking() function? When do we require it and when should we
use it?

As I saw from src/interfaces/libpq/fe-exec.c, PQsetnonblocking() only
assigns True or False to conn->nonblocking variable. When I searched
for "->nonblocking" under libpq directory, I found that it's used
while creating an empty PGconn and while closing PGconn. This didn't
help me too.

I'd be so appreciated for a comprehensive "specialized for dummies" answer.

P.S. Documentation pointers will be accepted with pleasure too.


pgsql-interfaces by date

Next:From: daniellewisDate: 2005-05-28 23:35:16
Subject: Re: MacOS Interface ?
Previous:From: Clay, BruceDate: 2005-05-27 15:58:10
Subject: Fw: PgOleDb / PostGis / PostgreSql interface problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group