Coder Social home page Coder Social logo

Comments (4)

tacaswell avatar tacaswell commented on June 15, 2024

A custom thread pool with a non-trivial 'affinity' policy? Would require pushing a lot of information down into the control layer though...

To some degree this is probably something the application should take care of and only register light-weight "move it from your queue to mine" operations directly on the PVs. We could ex, give each top-level ophyd object it's own thread (or group them somehow) so sleeps won't mess with other devices?

from caproto.

danielballan avatar danielballan commented on June 15, 2024

That seems right. I liked the idea of "I'll just put in a lock inside my callback," until we realized that order wasn't guaranteed even so. "Move it from your queue to mine," is a better version of that. Group by Devices to keep their components from getting too far out of sync is sensible.

from caproto.

danielballan avatar danielballan commented on June 15, 2024

New thought on this: a server only guarantees time ordering per circuit, so it is safe to move from one worker thread per context to one worker thread per circuit.

I think we should extend the same approach we have now: give users one thread pool per circuit but put one worker in the pool by default. Leave it up to them whether to turn up the number of workers to get more concurrency in some use case where it is OK to start one job before the previous job has completed.

from caproto.

danielballan avatar danielballan commented on June 15, 2024

The idea in my previous comment was implemented some time ago in #320. I think this is the best we can do without adding a bunch of complexity ("a non-trivial affinity policy"). I'm going to close -- feel free to reopen if you thing it's worth going further here.

from caproto.

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.