GithubHelp home page GithubHelp logo

Support thread group about fail-rs HOT 5 OPEN

tikv avatar tikv commented on May 30, 2024
Support thread group

from fail-rs.

Comments (5)

BusyJay avatar BusyJay commented on May 30, 2024

/cc @brson @Little-Wallace @lucab

from fail-rs.

lucab avatar lucab commented on May 30, 2024

@BusyJay nice! A bunch of high-level questions:

  • can the thread-group logic be folded into FailScenario? register_current doesn't seem to be very different from threadgroup-bound setup.
  • would it be better for the API to take a ThreadId argument instead?
  • I have no idea how this would actually work at the low level; how do you intend to plug this into the eval logic?

from fail-rs.

BusyJay avatar BusyJay commented on May 30, 2024

can the thread-group logic be folded into FailScenario?

FailGroup can be accessed via a global fuction, so it may not be appropriate to use FailScenario directly. But I think it can be defined as a field of FailScenario if necessary.

would it be better for the API to take a ThreadId argument instead?

I'm not sure. I find it more convenient to just register current thread instead of others. For example, thread pool generally provides after_start, before_stop hooks to allow do work in a thread, but generally won't provide thread ID directly.

plug this into the eval logic?

When evaluating, it uses current thread ID to find out which thread group it belongs to, and then check the rules of the group.

from fail-rs.

Little-Wallace avatar Little-Wallace commented on May 30, 2024

It seems complex. Why can not we launch multiple process and each process runs some test with a single thread?

from fail-rs.

BusyJay avatar BusyJay commented on May 30, 2024

Process isn't compatible with the default test runner.

from fail-rs.

Related Issues (15)

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.