1
我正在用最新的Finance :: InteractiveBrokers :: TWS 模塊在Perl中編寫一個交易程序。我開球在一個單獨的線程的命令行界面在 開始我的計劃,但後來當我試圖創建一個交易平臺的對象,我的程序 這個消息退出:在線程中使用內聯:: Java中的線程
As of Inline v0.30, use of the Inline::Config module is no longer supported or
allowed. If Inline::Config exists on your system, it can be removed. See the
Inline documentation for information on how to configure Inline. (You should
find it much more straightforward than Inline::Config :-)
我的最新版本內聯和內聯:: Java。我看着TWS.pm,它似乎沒有使用Inline :: Config。我在 '使用內聯()' 設置 'SHARED_JVM => 1' 和 'Inline->綁定()' 中TWS.pm呼籲,但沒有解決問題...
我的代碼:
use Finance::InteractiveBrokers::TWS;
use threads;
use threads::shared;
our $callback;
our $tws;
my $interface = UserInterface->new();
share($interface);
my $t = threads->create(sub{$interface->runUI()});
$callback= TWScallback->new();
$tws = Finance::InteractiveBrokers::TWS->new($manager); #This is where the program fails