Stackful Libraries Libgo (stand-alone 1 million co-process)

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

Libgo is a stackful co-libraries with collaborative scheduling written in C + + and a powerful parallel programming library.

At the beginning of the design, it provides the framework support for the development of high concurrency distributed Linux Server program, which can make the third-party library with the link-to-program synchronization become the asynchronous library, and improve its performance without affecting the logic .

Currently supports two platforms:

    • Linux (GCC 4.8+)

    • Windows (Win7, Win8, WIN10 x86 and x64 using VS2013/2015 compilation)

Use LIBGO to write parallel programs that can be developed quickly and logically as well as Golang, with the performance benefits of C + + native.

    • 1. Provide Golang General function powerful Association, write code based on Corontine, can write simple code in a synchronous way, and get asynchronous performance

    • 2. Support massive coprocessor, create 1 million co-process only using 2GB memory

    • 3. Allow users to freely control the scheduling point, change the number of scheduling threads anytime, anywhere;

    • 4. Support multi-thread scheduling process, easy to write parallel code, efficient parallel scheduling algorithm, can effectively utilize multiple CPU cores

    • 5. You can make the third-party library of the linked-to-program synchronization become an asynchronous call, greatly improving its performance. No more worrying. Some DB officials do not provide asynchronous driver, such as Hiredis, Mysqlclient, which can be used directly by the client driver, and can get the performance of not losing to asynchronous driver.

    • 6. Dynamic links and static links are all supported, making it easy to use c++11 's user static chaining to deliver executables and deploy to low-version Linux systems.

    • 7. Provide Co_mutex, timers, channel and other features to help users to write programs more easily.

    • 8. Strong network performance, on the Linux system beyond the ASIO asynchronous model, especially in the processing of small packets and multi-threaded parallelism is very powerful

    • In the source code of the Samples directory there are many sample code, including detailed instructions, so that users can easily learn to use the LIBGO.

?
12345678910111213141516171819 #include <stdio.h>#include <libgo/coroutine.h> co_main(intargc, char**argv){    go []{        printf("1\n");        co_yield;        printf("2\n");    };    go []{        printf("3\n");        co_yield;        printf("4\n");    };    return0;}

Http://www.oschina.net/p/libgo

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.