[Samba] Libsmbclient & Threading
mgiesbert at david-gmbh.de
Tue Jan 11 17:05:04 GMT 2005
i just wanted to ask if we got a definite "no go" here on libsmbclient's
thread safety/reentrantness? my app crashes if i start to downloads
how is, for example, kde's konqueror able to copy multiple files from an
smb server simultaneously?
has rewriting of libsmbcliemt against samba4 already started. is there
any kind of test version available?
Libsmbclient & Threading
Michael B Allen mba2000 at ioplex.com
Mon Sep 20 05:32:33 GMT 2004
* Previous message: Libsmbclient & Threading
* Next message: Libsmbclient & Threading
* Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, 19 Sep 2004 12:38:23 -0700 (PDT)
Richard Sharpe <rsharpe at richardsharpe.com> wrote:
> On Mon, 20 Sep 2004, Kovalyeff Sergey wrote:
> > Hello people.
> > Is it possible to use libsmbclient in multi-threaded processes?
> > I bumbed into that different processes mixing their data in parallel
> > requests... If it possible, what should I do for isolating different
> > requests from each other ?
> libsmbclient, and indeed, the underlying library that it uses, libsmb,
> were not written to be used from threaded applications.
> I think libsmbclient will have to be rewritten against Samba 4 to be
> usable from threaded applications.
I think it is important to distinguish between "thread-safe" and
"reentrant". By "thread-safe" I mean multiple threads can operate on
the same object concurrently (e.g. two threads querying the same file
descriptor at the same time) and by "reentrant" I mean multiple threads
can operate on separate objects concurrently (e.g. two threads querying
the same file but with separate file descriptors at the same time). It
is overkill for most things to be thread-safe and most things are not
thread-safe whereas virtually all libraries should be reentrant but
unfortunately there are many that are not.
More information about the samba-technical