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

Commit

Permalink
Undo timeout in ONIContextTask.ReadFrame()
Browse files Browse the repository at this point in the history
- This was an experimental idea that should not have been commited. It
is now presented as issue #10
  • Loading branch information
jonnew committed Dec 16, 2021
1 parent e5c47a3 commit 0fc51d1
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions Bonsai.ONIX/ONIContextTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,25 +264,10 @@ internal void WriteRegister(uint deviceIndex, uint registerAddress, uint value)

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

//lock (readLock)
//{

//}
}

public void Write<T>(uint deviceIndex, T data) where T : unmanaged
Expand Down

0 comments on commit 0fc51d1

Please sign in to comment.