Type/to search
0
Follow
0
Followers
Preguntas sobre exchange.Go
FAQ
Created 2018-06-25 15:40:05  
 1
 1868

var a = exchange.Go (("GetTicker"); // GetTicker ejecuta multithread asíncrono
var b = exchange.Go("GetDepth");
var c = exchange.Go("Buy", 1000, 0.1);
var d = exchange.Go("GetRecords", PERIOD_H1);
// Las cuatro operaciones anteriores se ejecutan simultáneamente y sincronizadas en múltiples hilos, no consumen tiempo y se devuelven inmediatamente
var ticker = a.wait ((); // llama el método wait para esperar el regreso asíncrono de los resultados de ticker
var depth = b.wait(); // devuelve profundidad, si la captura falla también es posible que devuelva null
var orderId = c.wait(1000); // devuelve el número de orden, limita el tiempo de espera de 1 segundo, el tiempo de espera devuelve undefined, esta imagen puede continuar llamando wait wait si el último tiempo de espera se ha excedido

Mi entendimiento: las primeras 4 líneas de la muestra son de devolución inmediata, pero las últimas 3 líneas de wait se ejecutan en orden, lo que equivale a no tener parpadeo y parpadeo, ¿hay alguna función de devolución?

Related Recommendations
Comment
All comments (1)

    图解:
    img

    img

    8 years ago
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)