Subject: Re: [libssh2] Non Blocking Status

Re: [libssh2] Non Blocking Status

From: Jens Alfke <>
Date: Thu, 4 Jan 2007 17:23:23 -0800

On 4 Jan '07, at 3:33 PM, Greg Hulands wrote:

> I would like to help out on this effort as I write a open source
> connection framework for Mac OS X that uses libssh2 for the sftp
> transfers. We have the problem that it pegs our worker thread to 100%
> of the cpu when using sftp.

That doesn't sound right. Blocking I/O shouldn't consume any more CPU
than non-blocking. If the worker thread is blocked waiting for data to
arrive (or be sent), it should be inside a system call, probably
read(), consuming no CPU.

You could post a sample of your process while it's in this state. Are
you sure it's not some other thread doing a spin-loop waiting for the
SFTP thread to do something?


Take Surveys. Earn Cash. Influence the Future of IT
Join's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash

libssh2-devel mailing list
Received on 2007-01-05