Implementing Streams Using C ++
I have an API call in my application where I check the time taken for one call. I put this in a FOR loop and used 10000 calls to get the average time of all calls. Now the problem is that the actual application using the API is multithreaded. If I want my application to do the same thing too, how would I do it?
REL platform and my goal is to send multiple calls at the same time with the same parameters or different parameters. Could this be implemented in C ++, and if so, which library should I use and could there be an example for this?
source to share
Probably the best C ++ library for streaming is the threading library in Boost, but like all C ++ threads, you will be forced to manually do your synchronization. You will need to use mutexes and locks for them to work properly. Your question is not very clear, so I canβt help you anymore (although I think you donβt actually need threads, but I may be completely incomprehensible).
source to share
With C ++ 11, you no longer need to use Boost. C ++ 11 includes std::thread
supporting mutexes, condition variables, and so on very much like Boost does.
You can take a look at what C ++ 11 offers in terms of streaming in the C ++ reference .
source to share