I've got the following simple program to solve a RosettaCode task
[Floyd's Triangle]:

---------------------------------
procedure main(a)
     n := integer(a[1]) | 5
     w := *string((n*(n+1))/2)+1
     c := create seq()
     every i := 1 to n do {
         every writes(right(|@c\i,w))
         write()
         }
end
---------------------------------
When compiled with SVN head, the program runs and produces the correct
output, right up to the end of the execution of main():

--------------------------------
unicon ft.icn
Parsing ft.icn: .
/opt/unicon/bin/icont -c   -O ft.icn /tmp/uni18000727
Translating:
ft.icn:
   main
No errors
/opt/unicon/bin/icont  ft.u
Linking:
You have new mail.
->ft
   1
   2  3
   4  5  6
   7  8  9 10
  11 12 13 14 15
System error at line 4 in ft.icn
The current thread already owns the mutex.
System error at line 4 in ft.icn
The current thread already owns the mutex.
->ft
   1
   2  3
   4  5  6
   7  8  9 10
  11 12 13 14 15
System error at line 4 in ft.icn
The current thread already owns the mutex.
->
--------------------------------

Note that the error messages appears twice on one run, and once
on the other.  If I stick a return at the end of main, or if I
stick an exit(0) at the end - the result is the same.

I don't see any reason for the execution at that point to be
inside the co-expression definition.

Is this expected behavior now - or is this a problem with the
interaction of concurrency and co-expressions in the implementation?

Thanks!
Steve
-- 
Steve Wampler -- swamp...@noao.edu
The gods that smiled on your birth are now laughing out loud.

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to