Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
pygolang pygolang
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • nexedi
  • pygolangpygolang
  • Merge requests
  • !5

Merged
Created Jul 28, 2020 by Kirill Smelkov@kirrOwner

gpython: Add way to run it with threads runtime

  • Overview 6
  • Commits 4
  • Changes 3

Until now gpython was always activating gevent on startup + adding goodness such as "always UTF-8 default encoding"; go, chan, b/u and friends available from builtin namespace, etc... While those goodness are sometimes useful on their own, it is not always appropriate to force a project to switch from threads to gevent.

For this reason add a flag to select which runtime - either gevent or threads - gpython should use.

    gpython -Xgpython.runtime=gevent        selects gevent,

while

    gpython -Xgpython.runtime=threads       selects threads.

Gevent remains the default.

It is also possible to specify desired runtime via $GPYTHON_RUNTIME environment variable.

The main change is in patch4. Patch3 is purely preparatory. Patch2 adds support for -V/--version along the way. Patch1 fixes -c/-m handling.

/cc @gabriel, @jerome, @klaus

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: y/gpython-runtime
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7