Giter VIP home page Giter VIP logo

Comments (3)

carljm avatar carljm commented on May 25, 2024

MonkeyType supports multiprocessing just fine, but it is up to you to trigger starting MonkeyType tracing in each separate process, in whatever way makes sense for your usage of multiprocessing. I am quite hesitant to attempt to make MonkeyType do this automatically / magically, because multiprocessing is very complicated and there are lots of different ways to use multiprocessing (e.g. spawn, fork, forkserver, etc.) It sounds like a bug magnet to me.

from monkeytype.

FunkyCoast avatar FunkyCoast commented on May 25, 2024

I think from point of view user: it would be a great feature. Especially for program parts that aren´t written by your own.
To search for every trigger of new started threads (if using multiprocessing) manually can be very tedious.
So overall in program refactoring cases, it would be very comfortabe for users if triggering new threads would happen magically :) But from point of view developer, i understand your arguments as well. It´s a big challange...
I don´t know if i just don´t find it, but it would be very helpfully if the topic handling multiprocessing / triggering new threads or follow the survival thread after an multiprocess in a program, would be handled in your documentation as example or something. For me it´s not clear how can I do this manually.
What I mean, detailed examples:
New thread:
Run a endless program. Program is waiting. Now a request come in, who is starting a new thread.
How can MT follow the new thread of the request?
Survival thread:
Run a program, the program use any package with an algorithm who uses multiprocessing.
How can MT follow the surviving thread after using this package in the program?

from monkeytype.

carljm avatar carljm commented on May 25, 2024

I'll leave this open for doc updates; quite happy for anyone who uses MonkeyType with multiple processes (or threads) to contribute documentation on how they handled starting tracing at the right time for their case.

Open to considering PRs for adding some automatic behavior as an option in MonkeyType, too, if someone has a specific proposal that will work correctly for many use cases and isn't too complex to maintain.

from monkeytype.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.