Results 1 to 2 of 2
  1. #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?

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,090
    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

  1. Replies: 0
    Last Post: January 22nd, 2013, 01:11 PM
  2. Replies: 16
    Last Post: January 9th, 2012, 12:30 PM
  3. Null Pointer Exception in Thread
    By Sathyaayyanar in forum Adapter SDKs
    Replies: 1
    Last Post: September 2nd, 2010, 10:00 AM
  4. Replies: 1
    Last Post: July 7th, 2010, 03:13 PM
  5. LS thread hangs on process exit
    By bartol82 in forum Adapter SDKs
    Replies: 3
    Last Post: October 20th, 2008, 03:01 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 07:35 PM.