Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1039687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:07:51+00:00 2026-05-16T15:07:51+00:00

I am building a aync single threaded server that receives data from clients. It

  • 0

I am building a aync single threaded server that receives data from clients. It processes the data and then saves it to the MySQL Database.

The problem is that, MySQL C API does not support non-blocking calls and asio mainly does not like blocking calls.

So I am thinking something like Python Twisted’s deferToThread() like semantics. Is there anyone who already developed such thing? Or should I implement it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T15:07:52+00:00Added an answer on May 16, 2026 at 3:07 pm

    There was a post to the Asio mailing list over the summer describing a generic asynchronous service class that seems like it might be useful for you. This pseudo code is from the author’s email I linked:

    // Create a command processor with 5 threads allocated
    // to processing the commands.
    async_command_processor processor(io_service, 5);
    
    // Execute the command asynchronously and call the
    // MyCommandComplete callback when completed.
    processor.async_execute(MyCommand, MyCommandComplete);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

building a site using PHP and MySQL that needs to store a lot of
Building a relatively simple website, and need to store some data in the database
Building a website that has English & Japanese speaking users, with the Japanese users
Building an iPhone OS application that will allow users to anonymously post information to
Building a commercial product may use various open source libraries that have use of
Building our Android app from Ant fails with this error: [apply] [apply] UNEXPECTED TOP-LEVEL
building a site which has content for each section. urls range from; /work/ /work/print/
building on my last question jQuery getting values from multiple selects together I have
Building my first WP theme and I quickly realized that I need to remove
Building a rails B2B application that will have various users. I'm pretty clear on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.