How to transmit messages from one thread to another thread?

gui

#1

I had created a thread to read data(Float type) from the device, now , I want to send the data to another thread which will draw lines according to the data. I don’t konw how to send or receive data.
I found the function:postMessage(Message* message) and handleMessage(const Message& message) may be helpful, but don’t know how to use it.
By the way, who knows the function or way to convert a number to ascii in JUCE? (like a given integer 53, then i can get the char ‘5’)
I would appreciate it if anyone can give some advice.


#2

#3

Thank you for your link, but I can’t open the video.:sweat:


#4

Ok, then search YouTube for Timur Doulmer 2015 C++


#5

Ok. Thank you very much.


How to create message queues to pass messages between threads?