Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Refinitiv Data Platform /
  • Refinitiv Data Platform Libraries /
avatar image
Question by martin.grunwald · Apr 27, 2020 at 11:15 AM · .netbug

Trying to open a data stream form within a stream callback causes a deadlock

Using example "3.1.0 - Streaming - MarketPrice" and connecting via Eikon4

Replace the OnRefresh handler with the following code:

.OnRefresh((s,msg) =>
{
    Console.WriteLine(msg);
    using (IStream s_ = DeliveryFactory.CreateStream(new ItemStream.Params().Session(session).Name("CHF=")))
    {    
        s_.Open();    
        Console.WriteLine("IT WORKED"); 
    }
})

The program does not return from s_.Open() and will never print "IT WORKED".

Same result when trying to await an OpenAsync() call.

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by nick.zincone.1 · Apr 27, 2020 at 02:00 PM

Hi @martin.grunwald,

Yes, the above code will create a deadlock scenario. Try this:

.OnRefresh(async (s, msg) =>
{
   Console.WriteLine(msg);
   using (IStream s_ = DeliveryFactory.CreateStream(new ItemStream.Params().Session(session).Name("CHF="))
   {
      await s_.OpenAsync();
      Console.WriteLine("IT WORKED");
   }
})


Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
8 People are following this question.

Related Questions

Exception when requesting ceratin combination of paramters with HistoricalPricing.GetSummaries

.Net example to request Level2 data does not work

NullReferenceException when trying to connect through Eikon in "offline" mode

HistoricalPricing.GetSummaries reponse IsSuccess returns "true" even if there is no data due to a permission error.

ItemStream OpenAsync does not return a usable state or error code

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges