Dukascopy
 
 
Wiki JStore Search Login

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.

Stop strategy without using 'System.exit(0);'
 Post subject: Stop strategy without using 'System.exit(0);' Post rating: 0   New post Posted: Mon 28 Jan, 2013, 18:16 

User rating: 0
Joined: Mon 26 Sep, 2011, 22:31
Posts: 3
Location: Trinidad and Tobago,
Hello,

I want to execute the 'TesterMain.java' as a thread so I need it to 'gracefully' close by completing its execution.
I do not want to use the following code in the ISystemListener
 
if (client.getStartedStrategies().size() == 0) {
    System.exit(0);
}

because it will close the JVM with all the other threads that are also running.

I don't understand why even after the completion of the 'StrategyRunner Thread' that the main thread is still not completed.
Any help will be appreciated.

-David


 
 Post subject: Re: Stop strategy without using 'System.exit(0);' Post rating: 0   New post Posted: Tue 29 Jan, 2013, 13:49 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
There is no such JForex-API methods that would halt the execution of the ITesterClient thread.


 

Jump to:  

  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com