diff options
Diffstat (limited to 'doc/lispref/objects.texi')
| -rw-r--r-- | doc/lispref/objects.texi | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index a76fbb1af7f..5e608bcc093 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi | |||
| @@ -1410,6 +1410,9 @@ editing. | |||
| 1410 | * Window Configuration Type:: Recording the way a frame is subdivided. | 1410 | * Window Configuration Type:: Recording the way a frame is subdivided. |
| 1411 | * Frame Configuration Type:: Recording the status of all frames. | 1411 | * Frame Configuration Type:: Recording the status of all frames. |
| 1412 | * Process Type:: A subprocess of Emacs running on the underlying OS. | 1412 | * Process Type:: A subprocess of Emacs running on the underlying OS. |
| 1413 | * Thread Type:: A thread of Emacs Lisp execution. | ||
| 1414 | * Mutex Type:: An exclusive lock for thread synchronization. | ||
| 1415 | * Condition Variable Type:: Condition variable for thread synchronization. | ||
| 1413 | * Stream Type:: Receive or send characters. | 1416 | * Stream Type:: Receive or send characters. |
| 1414 | * Keymap Type:: What function a keystroke invokes. | 1417 | * Keymap Type:: What function a keystroke invokes. |
| 1415 | * Overlay Type:: How an overlay is represented. | 1418 | * Overlay Type:: How an overlay is represented. |
| @@ -1625,6 +1628,63 @@ giving the name of the process: | |||
| 1625 | return information about, send input or signals to, and receive output | 1628 | return information about, send input or signals to, and receive output |
| 1626 | from processes. | 1629 | from processes. |
| 1627 | 1630 | ||
| 1631 | @node Thread Type | ||
| 1632 | @subsection Thread Type | ||
| 1633 | |||
| 1634 | A @dfn{thread} in Emacs represents a separate thread of Emacs Lisp | ||
| 1635 | execution. It runs its own Lisp program, has its own current buffer, | ||
| 1636 | and can have subprocesses locked to it, i.e.@: subprocesses whose | ||
| 1637 | output only this thread can accept. @xref{Threads}. | ||
| 1638 | |||
| 1639 | Thread objects have no read syntax. They print in hash notation, | ||
| 1640 | giving the name of the thread (if it has been given a name) or its | ||
| 1641 | address in core: | ||
| 1642 | |||
| 1643 | @example | ||
| 1644 | @group | ||
| 1645 | (all-threads) | ||
| 1646 | @result{} (#<thread 0176fc40>) | ||
| 1647 | @end group | ||
| 1648 | @end example | ||
| 1649 | |||
| 1650 | @node Mutex Type | ||
| 1651 | @subsection Mutex Type | ||
| 1652 | |||
| 1653 | A @dfn{mutex} is an exclusive lock that threads can own and disown, | ||
| 1654 | in order to synchronize between them. @xref{Mutexes}. | ||
| 1655 | |||
| 1656 | Mutex objects have no read syntax. They print in hash notation, | ||
| 1657 | giving the name of the mutex (if it has been given a name) or its | ||
| 1658 | address in core: | ||
| 1659 | |||
| 1660 | @example | ||
| 1661 | @group | ||
| 1662 | (make-mutex "my-mutex") | ||
| 1663 | @result{} #<mutex my-mutex> | ||
| 1664 | (make-mutex) | ||
| 1665 | @result{} #<mutex 01c7e4e0> | ||
| 1666 | @end group | ||
| 1667 | @end example | ||
| 1668 | |||
| 1669 | @node Condition Variable Type | ||
| 1670 | @subsection Condition Variable Type | ||
| 1671 | |||
| 1672 | A @dfn{condition variable} is a device for a more complex thread | ||
| 1673 | synchronization than the one supported by a mutex. A thread can wait | ||
| 1674 | on a condition variable, to be woken up when some other thread | ||
| 1675 | notifies the condition. | ||
| 1676 | |||
| 1677 | Condition variable objects have no read syntax. They print in hash | ||
| 1678 | notation, giving the name of the condition variable (if it has been | ||
| 1679 | given a name) or its address in core: | ||
| 1680 | |||
| 1681 | @example | ||
| 1682 | @group | ||
| 1683 | (make-condition-variable (make-mutex)) | ||
| 1684 | @result{} #<condvar 01c45ae8> | ||
| 1685 | @end group | ||
| 1686 | @end example | ||
| 1687 | |||
| 1628 | @node Stream Type | 1688 | @node Stream Type |
| 1629 | @subsection Stream Type | 1689 | @subsection Stream Type |
| 1630 | 1690 | ||
| @@ -1830,6 +1890,9 @@ with references to further information. | |||
| 1830 | @item commandp | 1890 | @item commandp |
| 1831 | @xref{Interactive Call, commandp}. | 1891 | @xref{Interactive Call, commandp}. |
| 1832 | 1892 | ||
| 1893 | @item condition-variable-p | ||
| 1894 | @xref{Condition Variables, condition-variable-p}. | ||
| 1895 | |||
| 1833 | @item consp | 1896 | @item consp |
| 1834 | @xref{List-related Predicates, consp}. | 1897 | @xref{List-related Predicates, consp}. |
| 1835 | 1898 | ||
| @@ -1875,6 +1938,9 @@ with references to further information. | |||
| 1875 | @item markerp | 1938 | @item markerp |
| 1876 | @xref{Predicates on Markers, markerp}. | 1939 | @xref{Predicates on Markers, markerp}. |
| 1877 | 1940 | ||
| 1941 | @item mutexp | ||
| 1942 | @xref{Mutexes, mutexp}. | ||
| 1943 | |||
| 1878 | @item wholenump | 1944 | @item wholenump |
| 1879 | @xref{Predicates on Numbers, wholenump}. | 1945 | @xref{Predicates on Numbers, wholenump}. |
| 1880 | 1946 | ||
| @@ -1908,6 +1974,9 @@ with references to further information. | |||
| 1908 | @item syntax-table-p | 1974 | @item syntax-table-p |
| 1909 | @xref{Syntax Tables, syntax-table-p}. | 1975 | @xref{Syntax Tables, syntax-table-p}. |
| 1910 | 1976 | ||
| 1977 | @item threadp | ||
| 1978 | @xref{Basic Thread Functions, threadp}. | ||
| 1979 | |||
| 1911 | @item vectorp | 1980 | @item vectorp |
| 1912 | @xref{Vectors, vectorp}. | 1981 | @xref{Vectors, vectorp}. |
| 1913 | 1982 | ||