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

Watchdog for ONIContextTask.ReadFrame() #10

Description

@jonnew

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions