I don't think this is a deadlock.  It's just an infinite recursion, made painfully slow by the delay.

Every task is started with enough resources to finish the task. As long as the OS has some way to ensure that no task will starve, deadlock should be impossible.

That was my reasoning when I designed this.  I sure hope it's right.

Henry Rich

On 4/13/2022 1:12 AM, Elijah Stone wrote:
   a=: {{> ". 'b' [ 6!:3]2}} t.'' 0
   b=: {{> ". 'a' [ 6!:3]2}} t.'' 0
   >a
[hang]

actually, it's enough to make it wait on itself:

   a=: {{> ". 'a' [ 6!:3]2}}t.'' 0
   >a
[hang]

Probably it should be an error.  E.G. pthread_join will return EDEADLK when it encounters an analogous situation.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm


--
This email has been checked for viruses by AVG.
https://www.avg.com

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to