Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.
This repository was archived by the owner on Jun 1, 2026. It is now read-only.

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

Description

@stephane78

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.)

Activity

  1. stephane78 commented on Nov 25, 2015

    @stephane78
    Author

    I use C++ ATL library and casablanca.

  2. stephane78 commented on Jan 8, 2016

    @stephane78
    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...

  3. ras0219-msft commented on Jan 19, 2016

    @ras0219-msft
    Contributor

    Thanks for posting the solution.

  4. added a commit that references this issue on Aug 1, 2018
  5. added a commit that references this issue on Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions