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
Post a Comment