lib(threads)


    This library implements most of the functionality described in
    the Draft Technical Recommendation ISO/IEC DTR 13211-5:2007
    'Prolog Multi-threading Support' (http://logtalk.org/plstd/threads.pdf),
    which is also the basis for multi-threading functionality in a
    number of Prolog systems (SWI, XSB, YAP).  To clarify notation,
    we will refer to

    this library's 'threads' as DTR-threads
    this library's 'queues' as DTR-queues


    Note that this library is just a thin layer on top of ECLiPSe's
    more general 'engine' functionality.  The main differences are:

    DTR-threads are implemented as ECLiPSe engines, and DTR-queues are
      implemented as ECLiPSe records.  While this in principle allows the
      mixing of ECLiPSe's native engine-API and this library's API, in the
      interest of readable code, programmers should commit to one of the APIs.

    An ECLiPSe engine can optionally be associated with an
      operating system thread, while DTR-threads are
      always associated with an operating system thread.

    An ECLiPSe engine can stop (with success, failure, etc),
      retain its state, and later be resumed.  In contrast, DTR-threads
      execute a single goal, are terminated as soon as this goal succeeds
      or fails or exits, and disappear when the thread is joined.

    Although this library implements alias names for DTR-threads
      and queues, they should be used sparingly because they prevent
      automatic garbage collection of the named object.  For efficiency
      reasons, only one alias per item is supported.





