开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

AW: twsapi: Java API


 

开云体育

You should look at EClientSocket.java:

?

It spawns an asynchronous thread with

tm_reader = new EReader( this, dis);

?

The wrapper functions are called from this thread whenever a message is received

by the client.? So there is no need to wait!? It’s done all asynchronously.

?

Gernot

?

-----Ursprüngliche Nachricht-----
Von: usernew [mailto:no_reply@...]
Gesendet: Tuesday, June 18, 2002 4:24 PM
An: twsapi@...
Betreff: twsapi: Java API

?

My program currently is structured as follows:

class TWS implements EWrapper {
? public void requestdata(...)
? public void tickPrice(...)
? public void tickSize(...)
? ...
? public void wait_trans() {
??? for(i=0; i < xxxxx; i++);
? }
}

public class Main {
?? tws.connect();
?? for(i=0; i
????? tws.requestdata(...)
?? tws.wait_trans();
?? tws.disconnect();
}

Is there a better way to structure this program ?

My concern is wait_trans(). It is continuously eating up cycles. My
program does not need to do anything while it is waiting for the
arrays to be populated, but I would still like to wait without
consuming cycles.

Thanks in advance



To unsubscribe from this group, send an email to:
twsapi-unsubscribe@...



Your use of Yahoo! Groups is subject to the .


Join [email protected] to automatically receive all group messages.