Giter Club home page Giter Club logo

Comments (6)

hehonghui avatar hehonghui commented on August 28, 2024

that's right, @vixtor 。all the message execute in a single thread when the thread mode is async.you can custom the async event handler like this :

public class ThreadPoolHandler implements EventHandler {
ExecutorService mExecutorService = Executors.newFixedThreadPool(3);
EventHandler mHandler = new DefaultEventHandler();
@OverRide
public void handleEvent(final Subscription subscription, final Object event) {
mExecutorService.submit(new Runnable() {
@OverRide
public void run() {
mHandler.handleEvent(subscription, event);
}
});
}
}

and then set async event handler with EventBus.getDefault().setAsyncEventHandeler(new ThreadPoolHandler());

from androideventbus.

vixtor avatar vixtor commented on August 28, 2024

Thank you, this worked perfectly. If I may suggest, you could add this in the next version as ThreadMode.THREADPOOL or something similar.

from androideventbus.

hehonghui avatar hehonghui commented on August 28, 2024

That's great advice. We will consider putting it into our next version. I
am collecting apps which adopt AndroidEventBus and they will be put in
readme.md. Would it be too much to ask you to share with us your App name
and download link? Thank you!

2015-04-22 18:31 GMT+08:00 Viktor Kvaternjak [email protected]:

Thank you, this worked perfectly. If I may suggest, you could add this in
the next version as ThreadMode.THREADPOOL or something similar.


Reply to this email directly or view it on GitHub
#11 (comment)
.

from androideventbus.

vixtor avatar vixtor commented on August 28, 2024

Sure, I will send it once it is finished and published.

from androideventbus.

hehonghui avatar hehonghui commented on August 28, 2024

Thank you very much![?]

2015-04-23 4:23 GMT+08:00 Viktor Kvaternjak [email protected]:

Sure, I will send it once it is finished and published.


Reply to this email directly or view it on GitHub
#11 (comment)
.

from androideventbus.

hehonghui avatar hehonghui commented on August 28, 2024

@vixtor hi,I am collecting apps which adopt AndroidEventBus and they will be put in
readme.md. Would it be too much to ask you to share with us your App name
and download link? Thank you!

from androideventbus.

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.