Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

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
Member

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant