c# - Prism EventAggregator Buffering -


the question simple, really. eventaggregator buffer events? example: single subscriber listening 2 different events, go , no-go. each event requires work, database updates, notifying ui etc. there many 64 publishers. publishers work in near real-time go or no-gos come quickly. can event aggregator buffer these subscriber can process them in serial fashion.

thanks, doug

by default subscribe action executed on same thread event published on. means publisher won't able publish event until previous 1 has been handled subscriber. events processed in serial fashion default.

you can change specifying threadoption when subscribe:

eventaggregator.getevent<youreventtype>().subscribe(s =>             {     //do make take while don't block publisher...     system.threading.thread.sleep(5000); }, threadoption.backgroundthread); 

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -