Python concurrent network programming library eventlet

Source: Internet
Author: User

Eventlet is an open-source highly scalable Python network programming library.

According to the official introduction, the features are as follows:

  • The non-blocking I/O model uses epoll or libevent. For the advantages of epoll, see epoll model and epoll essence in Linux.
  • Coroutines allows developers to adopt a blocking development style, but can achieve non-blocking I/O effects.
  • Implicit event scheduling allows you to use the python interpreter or applicationProgramTo use eventlet.

Eventlet can be used to deal with multithreading. It uses green threads (such as coroutines and coroutine), so resource overhead is very small. The coroutine can be roughly understood as allowing subprograms to pause and resume execution multiple times. It is an effective way to achieve multi-task. For details, see here. Green threads consumes almost no resources and does not schedule jobs by preemptible means. Instead, it releases (yield) to execute other green threads. The main advantage of using this method is that you do not need to lock the shared data structure, because only after the explicit yield, another green thread can access the shared data structure.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.