Giter Club home page Giter Club logo

Comments (9)

lye avatar lye commented on June 20, 2024

It should be updated once/frame. The read-during-update issue is a known one and why I'm not particularly fond of using shared memory for IPC.

I can look into exposing a session-shared mutex. I'm not sure our platform abstraction layer provides that functionality, so no promises.

from api-cdi.

aRestless avatar aRestless commented on June 20, 2024

Paging @meh because I think he solved that problem on his NPAPI plugin.

from api-cdi.

meh avatar meh commented on June 20, 2024

@aRestless nope, it doesn't do any checks, just hopes for the best.

from api-cdi.

sliekens avatar sliekens commented on June 20, 2024

I can look into exposing a session-shared mutex. I'm not sure our platform abstraction layer provides that functionality, so no promises.

Thanks. That would be amazing.

from api-cdi.

aRestless avatar aRestless commented on June 20, 2024

Hm. To be honest I wouldn't throw resources at the MumbleLink protocol, but rather focus on an own, inherently thread-safe protocol for real time data that includes the same information. Additionally that mutex could potentially slow down the rendering process, especially if more than one external application would be accessing it.

from api-cdi.

sliekens avatar sliekens commented on June 20, 2024

that mutex could potentially slow down the rendering process

Only if the game client can't immediately acquire a lock and is programmed to wait for it. But it shouldn't wait. It should just fast-exit the update procedure if the mutex is already in use.

focus on an own, inherently thread-safe protocol for real time data that includes the same information

Yes please!

from api-cdi.

aRestless avatar aRestless commented on June 20, 2024

It should just fast-exit the update procedure if the mutex is already in use.

That can easily lead to starvation. Say my app and GW2 run at roughly the same fps/refresh rate, but my app runs a slight bit earlier than GW2. Then my app will always block GW2 from its update procedure.

Of course in reality there will be differences in runtime and the problem will only persist for short intervals but even then, would you really want that behaviour for real time data?

from api-cdi.

sliekens avatar sliekens commented on June 20, 2024

Per definition it's not real-time data if you have to wait to acquire a lock. And I think it's unreasonable for most apps to request an update at the same refresh rate as it gets written.

from api-cdi.

lye avatar lye commented on June 20, 2024

Not going to add a lock to the MumbleLink data -- my recommendation is that you handle exceptions due to mis-reads gracefully on the application side. Eventually I'd like to expose real-time data from the local client (e.g., via a websocket) but that's really really far off (read: after guild chat and character portraits).

Created a new issue for more accurate tracking.

from api-cdi.

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.