|
Attention! Read the forum rules carefully before posting a topic.
Try to find an answer in Wiki before asking a question. Submit programming questions in this forum only. Off topics are strictly forbidden.
Any topics which do not satisfy these rules will be deleted.
Monitoring Thread Queue |
[SquareRoot]
|
Post subject: Monitoring Thread Queue |
Post rating: 0
|
Posted: Mon 28 Feb, 2011, 03:10
|
|
User rating: 0
Joined: Tue 15 Sep, 2009, 00:44 Posts: 20
|
I need a code sample of how to print a message that shows the number of thread tasks in queue on each onBar event.
|
|
|
|
 |
[quantisan]
|
Post subject: Re: Monitoring Thread Queue |
Post rating: 0
|
Posted: Tue 01 Mar, 2011, 03:17
|
|
User rating: 1
Joined: Fri 26 Mar, 2010, 19:19 Posts: 116 Location: Canada
|
it's 1 thread in onBar unless you added more yourself.
You can make sure with a profiling tool like VisualVM.
|
|
|
|
 |
[SquareRoot]
|
Post subject: Re: Monitoring Thread Queue |
Post rating: 0
|
Posted: Wed 02 Mar, 2011, 02:05
|
|
User rating: 0
Joined: Tue 15 Sep, 2009, 00:44 Posts: 20
|
My strategy keeps getting the following error. I am trying to isolate the problem and determine how to fix it. I need some example code that shows me how to print a message that shows me where the queue is being overloaded. I'm not sure where to start.
Strategy thread queue overloaded with tasks. Ticks in queue - 0, bars - 502, other tasks - 0
|
|
|
|
 |
API Support
|
Post subject: Re: Monitoring Thread Queue |
Post rating: 0
|
Posted: Wed 02 Mar, 2011, 08:54
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
This message means that strategy thread can't process messages it receives. Most likely you block it in one of the IStrategy methods.
There is not method that print number of tasks. You can print messages with time when onBar, onTick, onMessage, onAccount gets called and message before leaving this methods. This will show where the strategy thread stops.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|