Skip to content

Conversation

@hsmatulis
Copy link
Owner

This is a prototype C++ multi threading implementation for the stackdriver output plugin.

It uses boost::asio and boost::beast, which use openssl. However, the code currently does not use
async IO. One further improvement is to do that. boost::asio supports a lot of ways to do that.


/* Get the authorization token */
std::unique_lock<std::mutex> lock(ctx->mutex);
char* c_token = get_google_token(plg_ctx);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to token mutex

}


extern "C" void stackdriver_cpp_flush(struct flb_stackdriver * plg_ctx, struct flb_thread* calling_thread, const char* data, size_t data_len, const char* tag, int tag_len) {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Document lifetime of variables and thread control

hsmatulis added a commit that referenced this pull request Dec 21, 2020
This could cause a hang:
Worker #1 gets list lock,
-> Worker #1 coro #1 sends TLS handshake
-> Worker #1 coro #1 yields
-> Worker #1 coro #2 tries to acquire list lock
-> deadlock :(
@github-actions
Copy link

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants