Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watchdog for ONIContextTask.ReadFrame() #10

Open
jonnew opened this issue Dec 16, 2021 · 0 comments
Open

Watchdog for ONIContextTask.ReadFrame() #10

jonnew opened this issue Dec 16, 2021 · 0 comments
Labels
question Further information is requested

Comments

@jonnew
Copy link
Collaborator

jonnew commented Dec 16, 2021

I wonder if it would be wise to remove the enable/disable stream register from the Heartbeat device so that ONIContextTask.ReadFrame() could have a hardware-based watchdog, like the following:

public oni.Frame ReadFrame()
{
    if (Monitor.TryEnter(readLock, new TimeSpan(0, 0, 1)))
    {
        try
        {
            return ctx.ReadFrame();
        }
        finally
        {
            Monitor.Exit(readLock);
        }
    }
    else
    {
        throw new Bonsai.WorkflowRuntimeException("Host lost heartbeat.");
    }
}

This may be is just a band aid over a more fundamental problem with RIFFA, and is only required because of issues with RIFFA.

@jonnew jonnew added the question Further information is requested label Dec 16, 2021
jonnew pushed a commit that referenced this issue Dec 16, 2021
- This was an experimental idea that should not have been commited. It
is now presented as issue #10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant