Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

are the http request/response of casablanca multithreaded in a COM STA object ?i.e do the task of casablanca run parallel in a COM STA object ? #10

Closed
stephane78 opened this issue Nov 3, 2015 · 3 comments

Comments

@stephane78
Copy link

Hi,
I make http request/response (and upload of file too ) with casablanca in a COM STA object. (an outlook addin)
it seems to block the software ( I cannot do something else and must wait,it freezes).

the following code is in a send(...) function in my STA COM object:

client.request(requete).then([this](task<http_response> responseTask)
{
http_response response;

                try
                {

                    response = responseTask.get();
                }
                catch (const http_exception &e)
                ...

does casablanca run well and parallel in a COM STA object ? shall I do something more to run my tasks parallel ?

or should I use atlserver library(or winhttp) and win32 instead of casablanca for http requests and multithreading(win32) in my COM object ?
(I will still use casablanca to parse the json in the responses.)

@stephane78
Copy link
Author

I use C++ ATL library and casablanca.

@stephane78
Copy link
Author

Ok I have solved my multitasking problem with casablanca.I have removed the external wait and made some modifications and have used windows messages and postmessage to a window (of the main thread ) of my COM object to signalize the end of my secondary thread...

@ras0219-msft
Copy link
Contributor

Thanks for posting the solution.

reneme pushed a commit to reneme/cpprestsdk that referenced this issue Aug 1, 2018
…ng_in_json to master

* commit '6c927f0c65700b535f932037a64a74910cd10e0e':
  fix json parsing of surrogate-pair utf16 characters
  add multi-block utf16 symbol parsing test
GerHobbelt pushed a commit to GerHobbelt/cpprestsdk that referenced this issue Mar 20, 2024
…_scheduling_gap

Provide scheduler_ptr to _ScheduleFuncWithAutoInline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants