pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Volkan YAZICI <volkan.yazici@gmail.com>
To: PostgreSQL Interfaces <pgsql-interfaces@postgresql.org>
Subject: libpq, blocking/nonblocking mechanism
Date: Sat, 28 May 2005 23:34:20 +0300
Message-ID: <7104a737050528133410045f04@mail.gmail.com> (raw)

Hi,

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.
Regards.

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



view thread (5+ messages)  latest in thread

Message-ID: <7104a737050528133410045f04@mail.gmail.com>
Permalink:  ../7104a737050528133410045f04@mail.gmail.com/
Also on:    postgresql.org/message-id/7104a737050528133410045f04@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: volkan.yazici@gmail.com
  Subject: Re: libpq, blocking/nonblocking mechanism
  In-Reply-To: <7104a737050528133410045f04@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox