I am new to javascript / jquery. I have a simple question that one of the java script functions is running and wants to see the thread id for this thread. In java we like
Thread.getID();//in java
which will print the thread id of the running thread. Similarly, what is the function we use to get the id of the current stream in javscript.
I really want to ...
In my JavaScript, I have a listener that listens to the channel. When a message appears in the channel, the callback method is called and processes the data. Therefore, I am trying to understand how this works. Let them say that there are 10 messages in the channel, and for each message a callback is called.
Suppose the callback method works for message "a", and while processing data for message "a", he received another message "b". Will the callback method for "b" be called after processing for message "a" has finished?
I wanted to check this by typing the thread number in a callback function that tells whether it is executed sequentially (single thread) or multiple threads. This is why I tried to print the stream id. Thank you for your responses.
Thanks Swati
source share