Is SEND cog safe in FastSpin?
rogloh
Posts: 5,787
@ersmith
I have a program which seems to work okay in PNut but not FastSpin.
In one Cog I rapidly switch the SEND output mapping between two different methods and it test whether it affects the SEND output in another Cog.
I found it randomly does output to the wrong method (one of the two chosen) in FastSpin on the Cog being tested but apparently not in PNut. I was thinking SEND is meant to be stored per Cog, not shared and I've coded accordingly to make use of that.
Is there a known or unknown issue here with Fastspin's SEND implementation? Some race condition or overlapping storage?
I'm using FastSpin 4.2.5B, I can try to update it.
I have a program which seems to work okay in PNut but not FastSpin.
In one Cog I rapidly switch the SEND output mapping between two different methods and it test whether it affects the SEND output in another Cog.
I found it randomly does output to the wrong method (one of the two chosen) in FastSpin on the Cog being tested but apparently not in PNut. I was thinking SEND is meant to be stored per Cog, not shared and I've coded accordingly to make use of that.
Is there a known or unknown issue here with Fastspin's SEND implementation? Some race condition or overlapping storage?
I'm using FastSpin 4.2.5B, I can try to update it.
Comments
Is SEND also readable at all I wonder? Are we able to read/preserve the old value of SEND if we don't know it's current mapping and then reassign it back later? Maybe this is doable, I should test it out later. it might possibly come in handy in some cases if you need to alter it setting and restore afterwards in the same function. I know each called function can have its own SEND reassignment, so that is another way to deal with this, but might be more restrictive, requiring all code doing the send to another destination to happen in deeper called functions which may not always be convenient.
Eg: