[e-lang] Deadlock and datalock

David Hopwood david.nospam.hopwood at blueyonder.co.uk
Wed Jul 5 23:56:59 EDT 2006


David Hopwood wrote:
> Here is an interesting subthread on comp.programming.threads [*] about
> deadlock and datalock:
> 
> <http://groups.google.co.uk/group/comp.programming.threads/browse_frm/thread/d1ab911ef1034c68/c96feeaf607bb96b>
> 
> This artificial example of a nondeterministic datalock was interesting
> (s1..3 are synchronous channels here, but they could as easily be promises):

Sorry, they couldn't be promises, because promises are single-assignment.
They could be MVars (where the value is set back to null/unbound by reading).

>   A1: read s1; write s2; read s2; read s3
>   A2: write s1; read s2; write s2; write s3
> 
> I seemed to make some progress in explaining the difference between
> datalock and deadlock:
> 
> <http://groups.google.co.uk/group/comp.programming.threads/tree/browse_frm/thread/d1ab911ef1034c68/a42ccb17fb5eb635?rnum=21#doc_10317758531f8672>
> 
> 
> [*] c.p.threads is normally very shared-state concurrency-oriented, mainly
>     discussing pthreads (and sometimes lock-free techniques), with considerable
>     skepticism toward message passing.

-- 
David Hopwood <david.nospam.hopwood at blueyonder.co.uk>




More information about the e-lang mailing list