Re: question about threading
From: "Anatoly Gutnick" <anatolyg@xxxxxxxxx>
Date: Sun, 3 Jun 2007 16:20:24 +0200 (CEST)
Hi,

find below my question and answer i got.
It is thread related.

Hope this answer you question.


i am looking in http://camaya.net/glooxfaq

"How about reentrancy and thread-safety?

*All functions are reentrant. No state is kept in shared or global
variables.*

*gloox is thread-safe in that there are neither shared memory nor global
variables. However, access to gloox objects from multiple threads needs
appropriate synchronization. Especially functions calling send() and recv(),
respectively, require some caution. *

*Update: gloox 0.9-rc2 and up have such synchronization."*

*Question:*

Does it mean that from gloox 0.9-rc2 it is safe:

-  safe to call send() from one thread and recv() from another?

-  safe to call connect() from one thread and disconnect() from another
thread?

- safe to call blocked connect() from one thread and disconnect() from
another thread?

- if it is not safe to call blocked connect() from one thread and
disconnect() from another thread, then how to terminate thread with blocked
connection properly?

Thanks,

Anatoly


Hi,


On Fri May 18 2007, Anatoly Gutnick wrote:

Does it mean that from gloox 0.9-rc2 it is safe:

-  safe to call send() from one thread and recv() from another?

-  safe to call connect() from one thread and disconnect() from another
thread?

- safe to call blocked connect() from one thread and disconnect() from
another thread?

Yes.

cheers,


Jakob


2007/6/3, Martin Acevedo <acevedoma@xxxxxxxxxxx>:


Hello, I´m new using gloox library, I have a simple question, is gloox a
single thread library? or it uses some kind of multithread environment,
(mutex, threads, critical sections)?

thank you...

_________________________________________________________________
Consigue aquí las mejores y mas recientes ofertas de trabajo EE.UU.
http://latino.msn.com/empleos



--
gloox-dev mailing list
to unsubscribe:
send a message with subject 'unsubscribe gloox-dev' to
minimalist@xxxxxxxxxx