infinite async looping help needed

20 views
Skip to first unread message

Jeff Greer

unread,
Dec 14, 2023, 1:54:00 AM12/14/23
to v8-users
Hello all,

I am new to v8, stilling learning a lot about c++. I have some basic understanding of how to create an embedded v8 application. I have been able to create a working basic example of

for await(const message of listener()) {
    ....
}

I have been able to share a v8::array of promises with some content generation but of course once the basic array of promises is empty the 'for await' ends. I want to be able to pump network data into an infinite 'for await()' loop. If there isn't any current network data then the loop should continue to wait until there is some.

I do not have any idea about how to approach this. Any and all help is very much appreciated.

TIA

Jeff
Reply all
Reply to author
Forward
0 new messages