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 8640319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:15:02+00:00 2026-06-12T11:15:02+00:00

am sorry for this dumb beginner question, but i have a real problem understanding

  • 0

am sorry for this dumb beginner question, but i have a real problem understanding the concept on asynchronous I/O, i dont speak about callback and other complicated stuff, i just wan to understand the beginning of “how python execute the code”

so here is the example i want to understand with

class Foo()
    take a user input # line 1
    seek for this input from the database # line 2
    make some operation using the database output # line 3
    make an output to the client and show the message to the page # line 4

so if a user will use Tornado for example, if he execute the code on the server, then, suppose we have 4 clients requesting the page where the url matches to the class Foo, then, how Python will execute the code;

ie; in python, since it’s a Script language, then every line is executing and returning the value? so does it execute the line 1 for the user 1, and then stops, and serves the line 1 for the client 2 and so on with the rest of clients, and then skip to the line 2 and so on?

  • 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-06-12T11:15:03+00:00Added an answer on June 12, 2026 at 11:15 am

    Question has not many to do with python. It’s rather a question about asynchronous python frameworks (i.e tornado).

    Clients in tornado are handled asynchronously. It means that when server processes clients request and hits the line where some async action is done (database query in your example – line #2) it breaks execution there and switches to another client. When database query is done notification about it goes to the queue and client waits there for its turn to be executed once more from the point he stopped (line #3).

    Tornado has it’s own pattern of execution of clients. It’s called reactor pattern. Basically it means the it is looping through the queue of clients and handling them when needed (i.e request came through socket, database query finnished).

    This non-blocking looping is done through operating system’s utilities like Epoll.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry for maybe dumb question, but i have HUGE problem with one case when
Sorry if this is a dumb question, but I have absolutely no idea how
Sorry if this is a dumb question but im creating a filter class that
Sorry if this is a dumb question, but it is possible to store, and
sorry this is probably a dumb question, but I want to make the background
Sorry if this is a dumb question but for the life of me I
I'm sorry if this is a dumb question. But if i set up devise,
Sorry if this is a dumb question. I don't ever have to write anything
Ok sorry this might seem like a dumb question but I cannot figure this
Sorry if this has been asked before or it's a really dumb question, but

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.