When I recived the data from net in other thread , how to send the data to main thread

I got the data from net in other thread ,but i dont’t now how to send the data to the main thread.

How about using a global parameter (pointer or structure), or a singleton object, or a consumers-producers pattern?
My favorite approach is singleton object, and add some locks in data accessing methods.