Changeset 15436


Ignore:
Timestamp:
10/29/20 16:54:29 (2 years ago)
Author:
Mark Evenson
Message:

Add some docstrings

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/LispThread.java

    r14690 r15436  
    11381138    }
    11391139
    1140     @DocString(name="make-thread", args="function &key name")
     1140    @DocString(name="make-thread",
     1141               args="function &key name",
     1142               doc="Create a thread of execution running FUNCTION possibly named NAME")
    11411143    private static final Primitive MAKE_THREAD =
    11421144        new Primitive("make-thread", PACKAGE_THREADS, true, "function &key name")
     
    11641166    };
    11651167
    1166     @DocString(name="threadp", args="object",
    1167     doc="Boolean predicate testing if OBJECT is a thread.")
     1168    @DocString(name="threadp",
     1169               args="object",
     1170               doc="Boolean predicate returning non-nil if OBJECT is a lisp thread")
    11681171    private static final Primitive THREADP =
    11691172        new Primitive("threadp", PACKAGE_THREADS, true)
     
    11761179    };
    11771180
    1178     @DocString(name="thread-alive-p", args="thread",
    1179     doc="Returns T if THREAD is alive.")
     1181    @DocString(name="thread-alive-p",
     1182               args="thread",
     1183               doc="Returns T if THREAD is alive.")
    11801184    private static final Primitive THREAD_ALIVE_P =
    1181         new Primitive("thread-alive-p", PACKAGE_THREADS, true, "thread",
    1182               "Boolean predicate whether THREAD is alive.")
     1185      new Primitive("thread-alive-p", PACKAGE_THREADS, true, "thread",
     1186                    "Boolean predicate whether THREAD is alive.")
    11831187    {
    11841188        @Override
     
    11961200    };
    11971201
    1198     @DocString(name="thread-name", args="thread",
    1199     doc="Return the name of THREAD, if it has one.")
     1202    @DocString(name="thread-name",
     1203               args="thread",
     1204               doc="Return the name of THREAD, if it has one.")
    12001205    private static final Primitive THREAD_NAME =
    12011206        new Primitive("thread-name", PACKAGE_THREADS, true)
     
    12121217
    12131218    private static final Primitive THREAD_JOIN =
    1214         new Primitive("thread-join", PACKAGE_THREADS, true, "thread",
    1215                       "Waits for thread to finish.")
     1219      new Primitive("thread-join", PACKAGE_THREADS, true, "thread",
     1220                    "Waits for THREAD to die before resuming execution\n"
     1221                    + "Returns the result of the joined thread as its primary value.\n"
     1222                    + "Returns T if the joined thread finishes normally or NIL if it was interrupted.")
    12161223    {
    12171224        @Override
    12181225        public LispObject execute(LispObject arg)
    12191226        {
    1220             // join the thread, and returns it's value.  The second return
     1227            // join the thread, and returns its value.  The second return
    12211228            // value is T if the thread finishes normally, NIL if its
    12221229            // interrupted.
  • trunk/abcl/src/org/armedbear/lisp/aver.lisp

    r14121 r15436  
    4242
    4343(defmacro aver (expr)
     44  "Signal simple-error when EXPR is non-NIL."
    4445  `(unless ,expr
    4546     (%failed-aver ,(format nil "~A" expr))))
  • trunk/abcl/src/org/armedbear/lisp/threads.lisp

    r14690 r15436  
    5555
    5656(defstruct mailbox
     57  "A first-in-first out queue of messages"
    5758  queue)
    5859
     
    103104
    104105(defstruct mutex
     106  "An object used as a mutex lock"
    105107  in-use)
    106108
    107109(defun get-mutex (mutex)
    108   "Acquires a lock on the `mutex'."
     110  "Acquires the lock associated with the MUTEX"
    109111  (synchronized-on mutex
    110112    (loop
     
    114116
    115117(defun release-mutex (mutex)
    116   "Releases a lock on the `mutex'."
     118  "Releases a lock associated with MUTEX"
    117119  (synchronized-on mutex
    118120    (setf (mutex-in-use mutex) NIL)
     
    120122
    121123(defmacro with-mutex ((mutex) &body body)
    122   "Acquires a lock on `mutex', executes the body
    123 and releases the lock."
     124  "Acquires a lock on MUTEX, executes BODY, and then releases the lock"
    124125  (let ((m (gensym)))
    125126    `(let ((,m ,mutex))
     
    136137
    137138(defun make-thread-lock ()
    138   "Returns an object to be used with the `with-thread-lock' macro."
     139  "Returns an object to be used with the WITH-THREAD-LOCK macro."
    139140  (gensym))
    140141
    141142(defmacro with-thread-lock ((lock) &body body)
    142   "Acquires a lock on the `lock', executes `body' and releases the lock."
     143  "Acquires the LOCK, executes BODY and releases the LOCK"
    143144  (let ((glock (gensym)))
    144145    `(let ((,glock ,lock))
Note: See TracChangeset for help on using the changeset viewer.