René's URL Explorer Experiment


Title: Can you provide an interface that calls back on the main thread? · Issue #90 · cpp-redis/cpp_redis · GitHub

Open Graph Title: Can you provide an interface that calls back on the main thread? · Issue #90 · cpp-redis/cpp_redis

X Title: Can you provide an interface that calls back on the main thread? · Issue #90 · cpp-redis/cpp_redis

Description: Hello, I am a game server developer. When we use cpp_redis, there will be a need to call back on the main thread. At present, I have sealed it with asio to temporarily meet the needs. Would like to ask if the official can provide such an...

Open Graph Description: Hello, I am a game server developer. When we use cpp_redis, there will be a need to call back on the main thread. At present, I have sealed it with asio to temporarily meet the needs. Would like to...

X Description: Hello, I am a game server developer. When we use cpp_redis, there will be a need to call back on the main thread. At present, I have sealed it with asio to temporarily meet the needs. Would like to...

Opengraph URL: https://github.com/cpp-redis/cpp_redis/issues/90

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can you provide an interface that calls back on the main thread?","articleBody":"Hello, I am a game server developer. When we use cpp_redis, there will be a need to call back on the main thread.\r\n\r\nAt present, I have sealed it with asio to temporarily meet the needs. Would like to ask if the official can provide such an interface. Or there are others with similar needs.\r\nMy own example: https://github.com/brinkqiang/dmredispp\r\n\r\n```\r\n#include \u003ccpp_redis/cpp_redis\u003e\r\n\r\n#include \u003ciostream\u003e\r\n\r\n#ifdef _WIN32\r\n#include \u003cWinsock2.h\u003e\r\n#endif /* _WIN32 */\r\n#include \"dmevent/dmevent_module.h\"\r\n\r\n\r\nint\r\nmain(void) {\r\n#ifdef _WIN32\r\n    //! Windows netword DLL init\r\n    WORD version = MAKEWORD(2, 2);\r\n    WSADATA data;\r\n\r\n    if (WSAStartup(version, \u0026data) != 0) {\r\n        std::cerr \u003c\u003c \"WSAStartup() failure\" \u003c\u003c std::endl;\r\n        return -1;\r\n    }\r\n#endif /* _WIN32 */\r\n\r\n    DMEVENT_INIT();\r\n    DMEVENT_BEGIN\r\n    {\r\n        fmt::print(\"-------------------------------------------- -------------------\\n\");\r\n        fmt::print(\"{} dmevent loop {} ...\\n\", DMGetExeName(), \"running\");\r\n        fmt::print(\"-------------------------------------------- -------------------\\n\");\r\n    }\r\n    DMEVENT_END;\r\n\r\n\r\n    //! Enable logging\r\n    cpp_redis::active_logger = std::unique_ptr\u003ccpp_redis::logger\u003e(new cpp_redis::logger);\r\n\r\n    cpp_redis::client client;\r\n\r\n    client.connect(\"127.0.0.1\", 6379, [\u0026](const std::string\u0026 host, std::size_t port, cpp_redis::client::connect_state status) {\r\n        DMEVENT_BEGIN\r\n        {\r\n            if (status == cpp_redis::client::connect_state::dropped) {\r\n                fmt::print(\"client disconnected from {}:{} isMain:{}\\n\", host, port, isMain());\r\n            }\r\n        }\r\n        DMEVENT_END;\r\n    });\r\n\r\n    int roleid = 0x1234;\r\n    // same as client. send({ \"SET\", \"hello\", \"42\" }, ...)\r\n    client.set(\"hello\", \"42\", [\u0026](cpp_redis::reply\u0026 reply) {\r\n        DMEVENT_BEGIN\r\n        {\r\n            fmt::print(\"set hello 42: {} roleid: {} isMain:{}\\n\", reply, roleid, isMain());\r\n        }\r\n        DMEVENT_END;\r\n    });\r\n\r\n    // same as client. send({ \"DECRBY\", \"hello\", 12 }, ...)\r\n    client.decrby(\"hello\", 12, [\u0026](cpp_redis::reply\u0026 reply) {\r\n        DMEVENT_BEGIN\r\n        {\r\n            fmt::print(\"decrby hello 12: {} roleid: {} isMain:{}\\n\", reply, roleid, isMain());\r\n        }\r\n        DMEVENT_END;\r\n    });\r\n\r\n    // same as client. send({ \"GET\", \"hello\" }, ...)\r\n    client.get(\"hello\", [\u0026](cpp_redis::reply\u0026 reply) {\r\n        DMEVENT_BEGIN\r\n        {\r\n            fmt::print(\"get hello: {} roleid: {} isMain:{}\\n\", reply, roleid, isMain());\r\n        }\r\n        DMEVENT_END;\r\n    });\r\n\r\n    // commands are pipelined and only sent when client.commit() is called\r\n    client.commit();\r\n\r\n    DMEVENT_RUN_UNTIL();\r\n    // synchronous commit, no timeout\r\n    //client.sync_commit();\r\n\r\n    // synchronous commit, timeout\r\n    // client.sync_commit(std::chrono::milliseconds(100));\r\n\r\n#ifdef _WIN32\r\n    WSACleanup();\r\n#endif /* _WIN32 */\r\n\r\n    return 0;\r\n}\r\n```","author":{"url":"https://github.com/brinkqiang","@type":"Person","name":"brinkqiang"},"datePublished":"2022-03-23T10:09:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/90/cpp_redis/issues/90"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:2c9d0302-ccf4-b6d0-eea0-83bea46c5133
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD02C:41B52:10145F2:148F332:697548D3
html-safe-nonce81523504733500ee7cac5e4725053bb690a4acc5bce48840c53075b4a421170d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDJDOjQxQjUyOjEwMTQ1RjI6MTQ4RjMzMjo2OTc1NDhEMyIsInZpc2l0b3JfaWQiOiI2MDgxNTQ0MjA4MjMxMjU0MjI3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac250361598d97c4fbc35cebc1673469a61986a6807a6d44171cbaa24dfd161d6e
hovercard-subject-tagissue:1177898173
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/cpp-redis/cpp_redis/90/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d7062cce51fe48f1016886ea4ec58cdc20832d3188d2b6abd78fe76c4710af85/cpp-redis/cpp_redis/issues/90
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d7062cce51fe48f1016886ea4ec58cdc20832d3188d2b6abd78fe76c4710af85/cpp-redis/cpp_redis/issues/90
og:image:altHello, I am a game server developer. When we use cpp_redis, there will be a need to call back on the main thread. At present, I have sealed it with asio to temporarily meet the needs. Would like to...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebrinkqiang
hostnamegithub.com
expected-hostnamegithub.com
None4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f
turbo-cache-controlno-preview
go-importgithub.com/cpp-redis/cpp_redis git https://github.com/cpp-redis/cpp_redis.git
octolytics-dimension-user_id45303665
octolytics-dimension-user_logincpp-redis
octolytics-dimension-repository_id158901124
octolytics-dimension-repository_nwocpp-redis/cpp_redis
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id38889153
octolytics-dimension-repository_parent_nwoCylix/cpp_redis
octolytics-dimension-repository_network_root_id38889153
octolytics-dimension-repository_network_root_nwoCylix/cpp_redis
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release488b30e96dfd057fbbe44c6665ccbc030b729dde
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/issues/90#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcpp-redis%2Fcpp_redis%2Fissues%2F90
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcpp-redis%2Fcpp_redis%2Fissues%2F90
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=cpp-redis%2Fcpp_redis
Reloadhttps://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/issues/90
Reloadhttps://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/issues/90
Reloadhttps://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/issues/90
cpp-redis https://patch-diff.githubusercontent.com/cpp-redis
cpp_redishttps://patch-diff.githubusercontent.com/cpp-redis/cpp_redis
Cylix/cpp_redishttps://patch-diff.githubusercontent.com/Cylix/cpp_redis
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fcpp-redis%2Fcpp_redis
Fork 207 https://patch-diff.githubusercontent.com/login?return_to=%2Fcpp-redis%2Fcpp_redis
Star 740 https://patch-diff.githubusercontent.com/login?return_to=%2Fcpp-redis%2Fcpp_redis
Code https://patch-diff.githubusercontent.com/cpp-redis/cpp_redis
Issues 35 https://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/issues
Pull requests 10 https://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/pulls
Discussions https://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/discussions
Actions https://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/actions
Projects 0 https://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/projects
Wiki https://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/wiki
Security 0 https://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/security
Insights https://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/pulse
Code https://patch-diff.githubusercontent.com/cpp-redis/cpp_redis
Issues https://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/issues
Pull requests https://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/pulls
Discussions https://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/discussions
Actions https://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/actions
Projects https://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/projects
Wiki https://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/wiki
Security https://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/security
Insights https://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/cpp-redis/cpp_redis/issues/90
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/cpp-redis/cpp_redis/issues/90
Can you provide an interface that calls back on the main thread?https://patch-diff.githubusercontent.com/cpp-redis/cpp_redis/issues/90#top
https://github.com/brinkqiang
https://github.com/brinkqiang
brinkqianghttps://github.com/brinkqiang
on Mar 23, 2022https://github.com/cpp-redis/cpp_redis/issues/90#issue-1177898173
https://github.com/brinkqiang/dmredispphttps://github.com/brinkqiang/dmredispp
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.