Giter Site home page Giter Site logo

Comments (5)

fniephaus avatar fniephaus commented on June 13, 2024 1

Maybe you are right though, not sure why primitiveYield doesn't resolve the problem. Looks like I may need to take another look at the primitive.

from trufflesqueak.

fniephaus avatar fniephaus commented on June 13, 2024

#busyWait uses [Time utcMicrosecondClock >= proceedTime] whileFalse, which is a block that includes primitive calls only. Therefore, this is a different form of the issue documented in #104.

from trufflesqueak.

LinqLover avatar LinqLover commented on June 13, 2024

But Processor yield didn't help, so isn't there something wrong with primitiveYield?

from trufflesqueak.

fniephaus avatar fniephaus commented on June 13, 2024

But Processor yield didn't help, so isn't there something wrong with primitiveYield?

No, as you mentioned, Processor yield is a primitive calls as well so the loop body remains trivial in the sense that there is no actual send that would trigger a check for interrupts. As a consequence, TruffleSqueak's bytecode loop will not be interrupted until the loop is exited. In 581730f, I drafted an idea that adds interrupt checks to the bytecode loop for such trivial loops. While this fixes both #167 and #104, we need to run the benchmarks to see how much it impacts peak performance.

from trufflesqueak.

fniephaus avatar fniephaus commented on June 13, 2024

Nope, my first comment was correct: you put the yield into busyWait and not into the block itself. Since the block contains no actual sends and no explicit yield, the bytecode loop is not exited until the timer expires. So indeed, we need to make sure to check for interrupts in such trivial loops.

from trufflesqueak.

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.