Coder Social home page Coder Social logo

Is libstrophe thread safe about libstrophe HOT 3 CLOSED

strophe avatar strophe commented on July 28, 2024
Is libstrophe thread safe

from libstrophe.

Comments (3)

bom-d-van avatar bom-d-van commented on July 28, 2024

I think I do misunderstood something. libstrophe does allow me to build multiple connections. Sorry for my bother.

from libstrophe.

pasis avatar pasis commented on July 28, 2024

libstrophe is not thread-safe. There may be problems when you create connections from different threads at the same time. Or when you call xmpp_send in one thread and xmpp_run/xmpp_run_once in another one. Thread-safety should be provided by program that uses libstophe.

But you can create different contexts for every thread and use each context in respective thread only. In this case it will be safe (as far as I know).

PS There is a mailing list https://groups.google.com/forum/#!forum/libstrophe

from libstrophe.

bom-d-van avatar bom-d-van commented on July 28, 2024

Thanks so much for your suggestions. Will be careful about that. :-)

On Fri, Sep 27, 2013 at 3:06 PM, Dmitry Podgorny
[email protected]:

libstrophe is not thread-safe. There may be problems when you create
connections from different threads at the same time. Or when you call
xmpp_send in one thread and xmpp_run/xmpp_run_once in another one.
Thread-safety should be provided by program that uses libstophe.

But you can create different contexts for every thread and use each
context in respective thread only. In this case it will be safe (as far as
I know).

PS There is a mailing list
https://groups.google.com/forum/#!forum/libstrophe


Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-25226691
.

Van Hu
Go Developer at The Plant

from libstrophe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.