OpenCoarrays
                                
                                 OpenCoarrays copied to clipboard
                                
                                    OpenCoarrays copied to clipboard
                            
                            
                            
                        Defect: STAT= in LOCK/UNLOCK does not return correct code on successfull locking/unlocking
Defect/bug report
The implementation of lock and unlock violates the F2008+ standard, in that it should return STAT=STAT_LOCKED/UNLOCKED for LOCK(..., STAT=...) and UNLOCK(..., STAT=...), respectively.
Furthermore do I doubt that lock() implements the F2008+ standard correctly, in that it should wait that a locked lock becomes available. I assume at first glance at the code, that it doesn't.
There also is code that seems to disallow locking on self, which should be possible:
 if(value == caf_this_image && image_index == caf_this_image)   goto stat_error;
Lock and unlock issue undocumented stat-codes on failure.
This applies to all version of opencoarray.
This is merely a reminder to myself to implement it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.