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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:22:18+00:00 2026-05-25T18:22:18+00:00

The problem happened in my proxy program, Considering G10K I use gevent in my

  • 0

The problem happened in my proxy program, Considering G10K I use gevent in my program and I use the low-level gevent.core to run all my function.

Before I change my program into multiple processes. everything is OK. But when I changed it, the problem appears.

I find the problem is that when process NO.2 accept the socket, then the events of process NO.1 will stop dispatch. And if I add a sleep(0.1) in my event, then came a surprise. BUT I lower the sleep time, the problem showed again.

The problem have bothered me for a weeks, still nothing to do with that, Could someone help me ?

I use event like that:

    core.init()
    self.ent_s_send = core.event(core.EV_WRITE,self.conn.fileno(),\
                            self.ser_send,[self.conn,self.body])
    self.ent_s_send.add()
    core.dispatch()
  • 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-25T18:22:18+00:00Added an answer on May 25, 2026 at 6:22 pm

    I think that the problem is in your code, because this code is working fine, with the same shared socket.

    When you accept sa ocket with EV_READ, you must get the client socket and free the control over the main socket; you must not write to it. You should use code similar to the following one:

    try:
        client_socket, address = sock.accept()
    except socket.error, err:
        if err[0] == errno.EAGAIN:
            sys.exc_clear()
            return
        raise
    core.event(core.EV_READ, client_socket.fileno(), callback)
    core.event(core.EV_WRITE, client_socket.fileno(), callback)
    core.event(core.EV_READ | core.EV_WRITE, client_socket.fileno(), callback)
    

    After this, set READ and WRITE events for this socket.

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

Sidebar

Related Questions

I have a major problem that happened to me. I am writing a program
So I have this problem, which has never happened to me before. I am
This problem has happened to me twice.Both times during programming with Borland C++.when i
I have found a problem with use JQuery timeout, i have a page with
Recently I have been working with the xml coding,and the problem happened. Given the
I have read many codes on this but none happened to solve the problem.
I run into problem with login screen in netbeans rcp. server side : glassfish
So the problem I am having has not actually happened yet. I am planning
I was trying to create a new product but some weird problem happened and
some time ago I happend to resolve a PG related problem with this SO

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.