none
What is the majic of timeout of blockcollection

    Question

  • i discover the CPU usage become lower

    if want to practise to mplement a blockcollection myself

    What is the majic of timeout of blockcollection


    Designer

    Wednesday, August 28, 2013 1:29 AM

Answers

  • Have you tried using TryTake without a timeout parameter?

    TryTake(out xxx);

    or tried the overload which takes a number of milliseconds as a parameter?

    TryTake(out xxx, 1000);

    Do these behave the same way?


    Paul Linton

    • Marked as answer by oooooxxxxx Wednesday, August 28, 2013 2:48 AM
    • Unmarked as answer by oooooxxxxx Wednesday, August 28, 2013 7:58 AM
    • Marked as answer by oooooxxxxx Wednesday, August 28, 2013 8:08 AM
    Wednesday, August 28, 2013 2:15 AM

All replies

  • Can you expand your question?  Do you have some code that you want help with?  What is a blockcollection?  What does timeout have to do with it?  Do you have a specific problem that you need help with?

    Generally having lower CPU usage is seen as a good thing.  Are you reporting it as a problem?

    (PS - There is no such thing as magic - Harry Potter is a work of fiction!)


    Paul Linton

    Wednesday, August 28, 2013 1:40 AM
  • i discover that there is a delay over 15 minutes when using TryTake(xxx, new TimeSpan(0,0,1)

    can it be improved?

    because i need low CPU usage and real time no delay


    Mathematician


    • Edited by oooooxxxxx Wednesday, August 28, 2013 1:55 AM
    Wednesday, August 28, 2013 1:55 AM
  • Have you tried using TryTake without a timeout parameter?

    TryTake(out xxx);

    or tried the overload which takes a number of milliseconds as a parameter?

    TryTake(out xxx, 1000);

    Do these behave the same way?


    Paul Linton

    • Marked as answer by oooooxxxxx Wednesday, August 28, 2013 2:48 AM
    • Unmarked as answer by oooooxxxxx Wednesday, August 28, 2013 7:58 AM
    • Marked as answer by oooooxxxxx Wednesday, August 28, 2013 8:08 AM
    Wednesday, August 28, 2013 2:15 AM
  • i7 CPU it use 35% when using TryTake(out xxx, 100); result in no delay in testing site.

    in production site, i got delay even if using TryTake(out xxx, 20);  and wait for 15 minutes, at around 3:00pm trading hours

    now i try to use TryTake(out xxx, 0); however the CPU reach 50 - 60%


    No need to worry as many books are not the core and true story




    • Edited by oooooxxxxx Wednesday, August 28, 2013 7:59 AM
    Wednesday, August 28, 2013 2:41 AM