-
September 2nd, 2021, 05:56 PM
#1
Do LightstreamClient reuse same thread?
I have 2 LightstreamClient instances but on events update I see the same thread for both instances, so if one instance is slow it also slows the other instance.
How can I specify that instances use different threads?
-
September 3rd, 2021, 08:53 AM
#2
In fact, the invocations to the listeners are done on a single shared thread.
If there are heavy or blocking operations to be done on update events, you should dispatch and enqueue these operations to separate custom executors (and take care of preserving the order, if needed).
In your case, if you want to use different executors for updates pertaining to different instances of LightstreamerClient, you can levarage the listener identity.
In fact, the invocations to the listeners don't specify the involved LightstreamerClient instance (which is usually a single one), but you can use different instances of SubscriptionListener for subscriptions done on different instances of LightstreamerClient.
Similar Threads
-
By Alessandro in forum Adapter SDKs
Replies: 0
Last Post: January 22nd, 2013, 12:11 PM
-
By peintre in forum General
Replies: 16
Last Post: January 9th, 2012, 11:30 AM
-
By Sathyaayyanar in forum Adapter SDKs
Replies: 1
Last Post: September 2nd, 2010, 09:00 AM
-
By dato in forum Client SDKs
Replies: 1
Last Post: July 7th, 2010, 02:13 PM
-
By bartol82 in forum Adapter SDKs
Replies: 3
Last Post: October 20th, 2008, 02:01 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 12:14 PM.
Bookmarks