home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
90%
| dexvert
| Hypertext Markup Language File (text/html)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| HTML document text
| default (weak)
| |
99%
| file
| LaTeX document text
| default
| |
98%
| file
| exported SGML document text
| default
| |
97%
| file
| exported SGML document, ASCII text
| default
| |
80%
| TrID
| HyperText Markup Language with DOCTYPE
| default
| |
19%
| TrID
| HyperText Markup Language
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| gt2
| HTML (Hyper Text Markup Language) Datei
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| text/html
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3c 21 44 4f 43 54 59 50 | 45 20 48 54 4d 4c 20 50 |<!DOCTYP|E HTML P|
|00000010| 55 42 4c 49 43 20 22 2d | 2f 2f 57 33 43 2f 2f 44 |UBLIC "-|//W3C//D|
|00000020| 54 44 20 48 54 4d 4c 20 | 33 2e 32 20 46 69 6e 61 |TD HTML |3.2 Fina|
|00000030| 6c 2f 2f 65 6e 22 3e 0a | 0a 3c 21 2d 2d 43 6f 6e |l//en">.|.<!--Con|
|00000040| 76 65 72 74 65 64 20 77 | 69 74 68 20 4c 61 54 65 |verted w|ith LaTe|
|00000050| 58 32 48 54 4d 4c 20 32 | 30 32 32 20 28 52 65 6c |X2HTML 2|022 (Rel|
|00000060| 65 61 73 65 64 20 4a 61 | 6e 75 61 72 79 20 31 2c |eased Ja|nuary 1,|
|00000070| 20 32 30 32 32 29 20 2d | 2d 3e 0a 3c 48 54 4d 4c | 2022) -|->.<HTML|
|00000080| 20 6c 61 6e 67 3d 22 65 | 6e 22 3e 0a 3c 48 45 41 | lang="e|n">.<HEA|
|00000090| 44 3e 0a 3c 54 49 54 4c | 45 3e 43 6f 6e 74 65 6e |D>.<TITL|E>Conten|
|000000a0| 74 73 20 6f 66 20 42 75 | 69 6c 74 2d 69 6e 20 4d |ts of Bu|ilt-in M|
|000000b0| 6f 64 75 6c 65 20 74 68 | 72 65 61 64 3c 2f 54 49 |odule th|read</TI|
|000000c0| 54 4c 45 3e 0a 0a 3c 4d | 45 54 41 20 48 54 54 50 |TLE>..<M|ETA HTTP|
|000000d0| 2d 45 51 55 49 56 3d 22 | 43 6f 6e 74 65 6e 74 2d |-EQUIV="|Content-|
|000000e0| 54 79 70 65 22 20 43 4f | 4e 54 45 4e 54 3d 22 74 |Type" CO|NTENT="t|
|000000f0| 65 78 74 2f 68 74 6d 6c | 3b 20 63 68 61 72 73 65 |ext/html|; charse|
|00000100| 74 3d 75 74 66 2d 38 22 | 3e 0a 3c 4d 45 54 41 20 |t=utf-8"|>.<META |
|00000110| 4e 41 4d 45 3d 22 76 69 | 65 77 70 6f 72 74 22 20 |NAME="vi|ewport" |
|00000120| 43 4f 4e 54 45 4e 54 3d | 22 77 69 64 74 68 3d 64 |CONTENT=|"width=d|
|00000130| 65 76 69 63 65 2d 77 69 | 64 74 68 2c 20 69 6e 69 |evice-wi|dth, ini|
|00000140| 74 69 61 6c 2d 73 63 61 | 6c 65 3d 31 2e 30 22 3e |tial-sca|le=1.0">|
|00000150| 0a 3c 4d 45 54 41 20 4e | 41 4d 45 3d 22 47 65 6e |.<META N|AME="Gen|
|00000160| 65 72 61 74 6f 72 22 20 | 43 4f 4e 54 45 4e 54 3d |erator" |CONTENT=|
|00000170| 22 4c 61 54 65 58 32 48 | 54 4d 4c 20 76 32 30 32 |"LaTeX2H|TML v202|
|00000180| 32 22 3e 0a 0a 3c 4c 49 | 4e 4b 20 52 45 4c 3d 22 |2">..<LI|NK REL="|
|00000190| 53 54 59 4c 45 53 48 45 | 45 54 22 20 48 52 45 46 |STYLESHE|ET" HREF|
|000001a0| 3d 22 74 65 78 2e 63 73 | 73 22 3e 0a 0a 3c 4c 49 |="tex.cs|s">..<LI|
|000001b0| 4e 4b 20 52 45 4c 3d 22 | 70 72 65 76 69 6f 75 73 |NK REL="|previous|
|000001c0| 22 20 48 52 45 46 3d 22 | 74 65 78 5f 6d 6e 2e 68 |" HREF="|tex_mn.h|
|000001d0| 74 6d 6c 22 3e 0a 3c 4c | 49 4e 4b 20 52 45 4c 3d |tml">.<L|INK REL=|
|000001e0| 22 75 70 22 20 48 52 45 | 46 3d 22 74 65 78 5f 6d |"up" HRE|F="tex_m|
|000001f0| 6e 2e 68 74 6d 6c 22 3e | 0a 3c 2f 48 45 41 44 3e |n.html">|.</HEAD>|
|00000200| 0a 20 0a 3c 42 4f 44 59 | 20 62 67 63 6f 6c 6f 72 |. .<BODY| bgcolor|
|00000210| 3d 22 23 66 66 66 66 66 | 66 22 20 74 65 78 74 3d |="#fffff|f" text=|
|00000220| 22 23 30 30 30 30 30 30 | 22 20 6c 69 6e 6b 3d 22 |"#000000|" link="|
|00000230| 23 39 39 34 34 45 45 22 | 20 76 6c 69 6e 6b 3d 22 |#9944EE"| vlink="|
|00000240| 23 30 30 30 30 66 66 22 | 20 61 6c 69 6e 6b 3d 22 |#0000ff"| alink="|
|00000250| 23 30 30 66 66 30 30 22 | 3e 0a 0a 3c 48 31 3e 3c |#00ff00"|>..<H1><|
|00000260| 41 20 49 44 3d 22 53 45 | 43 54 49 4f 4e 30 30 30 |A ID="SE|CTION000|
|00000270| 31 30 30 30 30 30 30 30 | 30 30 30 30 30 30 30 30 |10000000|00000000|
|00000280| 30 22 3e 0a 42 75 69 6c | 74 2d 69 6e 20 4d 6f 64 |0">.Buil|t-in Mod|
|00000290| 75 6c 65 20 74 68 72 65 | 61 64 3c 2f 41 3e 0a 3c |ule thre|ad</A>.<|
|000002a0| 2f 48 31 3e 0a 74 68 72 | 65 61 64 0a 0a 3c 50 3e |/H1>.thr|ead..<P>|
|000002b0| 0a 54 68 69 73 20 6d 6f | 64 75 6c 65 20 70 72 6f |.This mo|dule pro|
|000002c0| 76 69 64 65 73 20 6c 6f | 77 2d 6c 65 76 65 6c 20 |vides lo|w-level |
|000002d0| 70 72 69 6d 69 74 69 76 | 65 73 20 66 6f 72 20 77 |primitiv|es for w|
|000002e0| 6f 72 6b 69 6e 67 20 77 | 69 74 68 20 6d 75 6c 74 |orking w|ith mult|
|000002f0| 69 70 6c 65 0a 74 68 72 | 65 61 64 73 20 28 61 2e |iple.thr|eads (a.|
|00000300| 6b 2e 61 2e 20 6c 69 67 | 68 74 2d 77 65 69 67 68 |k.a. lig|ht-weigh|
|00000310| 74 20 70 72 6f 63 65 73 | 73 65 73 20 6f 72 20 74 |t proces|ses or t|
|00000320| 61 73 6b 73 29 20 26 6d | 64 61 73 68 3b 20 6d 75 |asks) &m|dash; mu|
|00000330| 6c 74 69 70 6c 65 0a 74 | 68 72 65 61 64 73 20 6f |ltiple.t|hreads o|
|00000340| 66 20 63 6f 6e 74 72 6f | 6c 20 73 68 61 72 69 6e |f contro|l sharin|
|00000350| 67 20 74 68 65 69 72 20 | 67 6c 6f 62 61 6c 20 64 |g their |global d|
|00000360| 61 74 61 20 73 70 61 63 | 65 2e 20 20 46 6f 72 0a |ata spac|e. For.|
|00000370| 73 79 6e 63 68 72 6f 6e | 69 7a 61 74 69 6f 6e 2c |synchron|ization,|
|00000380| 20 73 69 6d 70 6c 65 20 | 6c 6f 63 6b 73 20 28 61 | simple |locks (a|
|00000390| 2e 6b 2e 61 2e 20 6d 75 | 74 65 78 65 73 20 6f 72 |.k.a. mu|texes or|
|000003a0| 20 62 69 6e 61 72 79 0a | 73 65 6d 61 70 68 6f 72 | binary.|semaphor|
|000003b0| 65 73 29 20 61 72 65 20 | 70 72 6f 76 69 64 65 64 |es) are |provided|
|000003c0| 2e 0a 0a 3c 50 3e 0a 54 | 68 65 20 6d 6f 64 75 6c |...<P>.T|he modul|
|000003d0| 65 20 69 73 20 6f 70 74 | 69 6f 6e 61 6c 20 61 6e |e is opt|ional an|
|000003e0| 64 20 73 75 70 70 6f 72 | 74 65 64 20 6f 6e 20 53 |d suppor|ted on S|
|000003f0| 47 49 20 49 52 49 58 20 | 34 2e 78 20 61 6e 64 20 |GI IRIX |4.x and |
|00000400| 35 2e 78 20 61 6e 64 20 | 53 75 6e 0a 53 6f 6c 61 |5.x and |Sun.Sola|
|00000410| 72 69 73 20 32 2e 78 20 | 73 79 73 74 65 6d 73 2c |ris 2.x |systems,|
|00000420| 20 61 73 20 77 65 6c 6c | 20 61 73 20 6f 6e 20 73 | as well| as on s|
|00000430| 79 73 74 65 6d 73 20 74 | 68 61 74 20 68 61 76 65 |ystems t|hat have|
|00000440| 20 61 20 50 54 48 52 45 | 41 44 0a 69 6d 70 6c 65 | a PTHRE|AD.imple|
|00000450| 6d 65 6e 74 61 74 69 6f | 6e 20 28 65 2e 67 2e 20 |mentatio|n (e.g. |
|00000460| 4b 53 52 29 2e 0a 0a 3c | 50 3e 0a 49 74 20 64 65 |KSR)...<|P>.It de|
|00000470| 66 69 6e 65 73 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |fines th|e follow|
|00000480| 69 6e 67 20 63 6f 6e 73 | 74 61 6e 74 20 61 6e 64 |ing cons|tant and|
|00000490| 20 66 75 6e 63 74 69 6f | 6e 73 3a 0a 0a 3c 50 3e | functio|ns:..<P>|
|000004a0| 0a 0a 3c 42 52 3e 0a 3c | 49 4d 47 0a 20 20 53 54 |..<BR>.<|IMG. ST|
|000004b0| 59 4c 45 3d 22 68 65 69 | 67 68 74 3a 20 31 39 36 |YLE="hei|ght: 196|
|000004c0| 2e 32 35 65 78 3b 20 76 | 65 72 74 69 63 61 6c 2d |.25ex; v|ertical-|
|000004d0| 61 6c 69 67 6e 3a 20 2d | 30 2e 35 37 65 78 3b 20 |align: -|0.57ex; |
|000004e0| 22 20 53 52 43 3d 22 69 | 6d 67 31 2e 70 6e 67 22 |" SRC="i|mg1.png"|
|000004f0| 0a 20 41 4c 54 3d 22 5c | 62 65 67 69 6e 7b 65 78 |. ALT="\|begin{ex|
|00000500| 63 64 65 73 63 7d 7b 65 | 72 72 6f 72 7d 0a 52 61 |cdesc}{e|rror}.Ra|
|00000510| 69 73 65 64 20 6f 6e 20 | 74 68 72 65 61 64 2d 73 |ised on |thread-s|
|00000520| 70 65 63 69 66 69 63 20 | 65 72 72 6f 72 73 2e 0a |pecific |errors..|
|00000530| 5c 65 6e 64 7b 65 78 63 | 64 65 73 63 7d 22 3e 0a |\end{exc|desc}">.|
|00000540| 3c 42 52 3e 0a 0a 3c 50 | 3e 0a 3c 42 52 3e 0a 3c |<BR>..<P|>.<BR>.<|
|00000550| 49 4d 47 0a 20 20 53 54 | 59 4c 45 3d 22 68 65 69 |IMG. ST|YLE="hei|
|00000560| 67 68 74 3a 20 32 2e 31 | 37 65 78 3b 20 76 65 72 |ght: 2.1|7ex; ver|
|00000570| 74 69 63 61 6c 2d 61 6c | 69 67 6e 3a 20 31 37 36 |tical-al|ign: 176|
|00000580| 2e 35 35 65 78 3b 20 22 | 20 53 52 43 3d 22 69 6d |.55ex; "| SRC="im|
|00000590| 67 32 2e 70 6e 67 22 0a | 20 41 4c 54 3d 22 5c 62 |g2.png".| ALT="\b|
|000005a0| 65 67 69 6e 7b 66 75 6e | 63 64 65 73 63 7d 7b 73 |egin{fun|cdesc}{s|
|000005b0| 74 61 72 74 5f 6e 65 77 | 5f 74 68 72 65 61 64 7d |tart_new|_thread}|
|000005c0| 7b 66 75 6e 63 5c 2c 20 | 61 72 67 7d 0a 53 74 61 |{func\, |arg}.Sta|
|000005d0| 72 74 20 61 20 6e 65 77 | 20 74 68 72 65 61 64 2e |rt a new| thread.|
|000005e0| 20 54 68 65 20 74 68 72 | 65 61 64 20 65 78 2e 2e | The thr|ead ex..|
|000005f0| 2e 0a 2e 2e 2e 65 64 20 | 61 6e 64 0a 74 68 65 6e |.....ed |and.then|
|00000600| 20 74 68 65 20 74 68 72 | 65 61 64 20 65 78 69 74 | the thr|ead exit|
|00000610| 73 20 28 62 75 74 20 6f | 74 68 65 72 20 74 68 72 |s (but o|ther thr|
|00000620| 65 61 64 73 20 63 6f 6e | 74 69 6e 75 65 20 74 6f |eads con|tinue to|
|00000630| 20 72 75 6e 29 2e 0a 5c | 65 6e 64 7b 66 75 6e 63 | run)..\|end{func|
|00000640| 64 65 73 63 7d 22 3e 0a | 3c 42 52 3e 0a 0a 3c 50 |desc}">.|<BR>..<P|
|00000650| 3e 0a 3c 42 52 3e 0a 3c | 49 4d 47 0a 20 20 53 54 |>.<BR>.<|IMG. ST|
|00000660| 59 4c 45 3d 22 68 65 69 | 67 68 74 3a 20 32 2e 33 |YLE="hei|ght: 2.3|
|00000670| 38 65 78 3b 20 76 65 72 | 74 69 63 61 6c 2d 61 6c |8ex; ver|tical-al|
|00000680| 69 67 6e 3a 20 31 37 36 | 2e 32 37 65 78 3b 20 22 |ign: 176|.27ex; "|
|00000690| 20 53 52 43 3d 22 69 6d | 67 33 2e 70 6e 67 22 0a | SRC="im|g3.png".|
|000006a0| 20 41 4c 54 3d 22 5c 62 | 65 67 69 6e 7b 66 75 6e | ALT="\b|egin{fun|
|000006b0| 63 64 65 73 63 7d 7b 65 | 78 69 74 7d 7b 7d 0a 54 |cdesc}{e|xit}{}.T|
|000006c0| 68 69 73 20 69 73 20 61 | 20 73 68 6f 72 74 68 61 |his is a| shortha|
|000006d0| 6e 64 20 66 6f 72 20 5c | 63 6f 64 65 7b 74 68 72 |nd for \|code{thr|
|000006e0| 65 61 64 2e 65 78 69 74 | 5f 74 68 72 65 61 64 28 |ead.exit|_thread(|
|000006f0| 29 7d 2e 0a 5c 65 6e 64 | 7b 66 75 6e 63 64 65 73 |)}..\end|{funcdes|
|00000700| 63 7d 22 3e 0a 3c 42 52 | 3e 0a 0a 3c 50 3e 0a 3c |c}">.<BR|>..<P>.<|
|00000710| 42 52 3e 0a 3c 49 4d 47 | 0a 20 20 53 54 59 4c 45 |BR>.<IMG|. STYLE|
|00000720| 3d 22 68 65 69 67 68 74 | 3a 20 32 2e 33 38 65 78 |="height|: 2.38ex|
|00000730| 3b 20 76 65 72 74 69 63 | 61 6c 2d 61 6c 69 67 6e |; vertic|al-align|
|00000740| 3a 20 31 37 36 2e 34 30 | 65 78 3b 20 22 20 53 52 |: 176.40|ex; " SR|
|00000750| 43 3d 22 69 6d 67 34 2e | 70 6e 67 22 0a 20 41 4c |C="img4.|png". AL|
|00000760| 54 3d 22 5c 62 65 67 69 | 6e 7b 66 75 6e 63 64 65 |T="\begi|n{funcde|
|00000770| 73 63 7d 7b 65 78 69 74 | 5f 74 68 72 65 61 64 7d |sc}{exit|_thread}|
|00000780| 7b 7d 0a 52 61 69 73 65 | 20 74 68 65 20 5c 63 6f |{}.Raise| the \co|
|00000790| 64 65 7b 53 79 73 74 65 | 6d 45 78 69 74 7d 20 65 |de{Syste|mExit} e|
|000007a0| 78 63 65 70 74 69 6f 6e | 2e 20 57 68 65 6e 20 6e |xception|. When n|
|000007b0| 6f 74 20 63 61 75 67 68 | 74 2c 20 74 68 69 73 20 |ot caugh|t, this |
|000007c0| 77 69 6c 6c 0a 63 61 75 | 73 65 20 74 68 65 20 74 |will.cau|se the t|
|000007d0| 68 72 65 61 64 20 74 6f | 20 65 78 69 74 20 73 69 |hread to| exit si|
|000007e0| 6c 65 6e 74 6c 79 2e 0a | 5c 65 6e 64 7b 66 75 6e |lently..|\end{fun|
|000007f0| 63 64 65 73 63 7d 22 3e | 0a 3c 42 52 3e 0a 0a 3c |cdesc}">|.<BR>..<|
|00000800| 50 3e 0a 3c 42 52 3e 0a | 3c 49 4d 47 0a 20 20 53 |P>.<BR>.|<IMG. S|
|00000810| 54 59 4c 45 3d 22 68 65 | 69 67 68 74 3a 20 32 2e |TYLE="he|ight: 2.|
|00000820| 31 37 65 78 3b 20 76 65 | 72 74 69 63 61 6c 2d 61 |17ex; ve|rtical-a|
|00000830| 6c 69 67 6e 3a 20 31 37 | 36 2e 36 38 65 78 3b 20 |lign: 17|6.68ex; |
|00000840| 22 20 53 52 43 3d 22 69 | 6d 67 35 2e 70 6e 67 22 |" SRC="i|mg5.png"|
|00000850| 0a 20 41 4c 54 3d 22 5c | 62 65 67 69 6e 7b 66 75 |. ALT="\|begin{fu|
|00000860| 6e 63 64 65 73 63 7d 7b | 61 6c 6c 6f 63 61 74 65 |ncdesc}{|allocate|
|00000870| 5f 6c 6f 63 6b 7d 7b 7d | 0a 52 65 74 75 72 6e 20 |_lock}{}|.Return |
|00000880| 61 20 6e 65 77 20 6c 6f | 63 6b 20 6f 62 6a 65 63 |a new lo|ck objec|
|00000890| 74 2e 20 4d 65 74 68 6f | 64 73 20 6f 66 20 6c 6f |t. Metho|ds of lo|
|000008a0| 63 6b 73 20 61 72 65 20 | 64 65 73 63 72 69 62 65 |cks are |describe|
|000008b0| 64 20 62 65 6c 6f 77 2e | 20 54 68 65 0a 6c 6f 63 |d below.| The.loc|
|000008c0| 6b 20 69 73 20 69 6e 69 | 74 69 61 6c 6c 79 20 75 |k is ini|tially u|
|000008d0| 6e 6c 6f 63 6b 65 64 2e | 0a 5c 65 6e 64 7b 66 75 |nlocked.|.\end{fu|
|000008e0| 6e 63 64 65 73 63 7d 22 | 3e 0a 3c 42 52 3e 0a 0a |ncdesc}"|>.<BR>..|
|000008f0| 3c 50 3e 0a 3c 42 52 3e | 0a 3c 49 4d 47 0a 20 20 |<P>.<BR>|.<IMG. |
|00000900| 53 54 59 4c 45 3d 22 68 | 65 69 67 68 74 3a 20 32 |STYLE="h|eight: 2|
|00000910| 2e 31 37 65 78 3b 20 76 | 65 72 74 69 63 61 6c 2d |.17ex; v|ertical-|
|00000920| 61 6c 69 67 6e 3a 20 31 | 37 36 2e 36 38 65 78 3b |align: 1|76.68ex;|
|00000930| 20 22 20 53 52 43 3d 22 | 69 6d 67 36 2e 70 6e 67 | " SRC="|img6.png|
|00000940| 22 0a 20 41 4c 54 3d 22 | 5c 62 65 67 69 6e 7b 66 |". ALT="|\begin{f|
|00000950| 75 6e 63 64 65 73 63 7d | 7b 67 65 74 5f 69 64 65 |uncdesc}|{get_ide|
|00000960| 6e 74 7d 7b 7d 0a 52 65 | 74 75 72 6e 20 74 68 65 |nt}{}.Re|turn the|
|00000970| 20 5c 6c 71 20 74 68 72 | 65 61 64 20 69 64 65 6e | \lq thr|ead iden|
|00000980| 74 69 66 69 65 72 27 20 | 6f 66 20 74 68 65 20 63 |tifier' |of the c|
|00000990| 75 72 72 65 6e 74 20 74 | 68 72 65 2e 2e 2e 0a 2e |urrent t|hre.....|
|000009a0| 2e 2e 61 79 20 62 65 20 | 72 65 63 79 63 6c 65 64 |..ay be |recycled|
|000009b0| 20 77 68 65 6e 20 61 20 | 74 68 72 65 61 64 20 65 | when a |thread e|
|000009c0| 78 69 74 73 20 61 6e 64 | 0a 61 6e 6f 74 68 65 72 |xits and|.another|
|000009d0| 20 74 68 72 65 61 64 20 | 69 73 20 63 72 65 61 74 | thread |is creat|
|000009e0| 65 64 2e 0a 5c 65 6e 64 | 7b 66 75 6e 63 64 65 73 |ed..\end|{funcdes|
|000009f0| 63 7d 22 3e 0a 3c 42 52 | 3e 0a 0a 3c 50 3e 0a 4c |c}">.<BR|>..<P>.L|
|00000a00| 6f 63 6b 20 6f 62 6a 65 | 63 74 73 20 68 61 76 65 |ock obje|cts have|
|00000a10| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 6d | the fol|lowing m|
|00000a20| 65 74 68 6f 64 73 3a 0a | 0a 3c 50 3e 0a 0a 3c 42 |ethods:.|.<P>..<B|
|00000a30| 52 3e 0a 3c 49 4d 47 0a | 20 20 53 54 59 4c 45 3d |R>.<IMG.| STYLE=|
|00000a40| 22 68 65 69 67 68 74 3a | 20 32 2e 32 34 65 78 3b |"height:| 2.24ex;|
|00000a50| 20 76 65 72 74 69 63 61 | 6c 2d 61 6c 69 67 6e 3a | vertica|l-align:|
|00000a60| 20 31 37 36 2e 34 31 65 | 78 3b 20 22 20 53 52 43 | 176.41e|x; " SRC|
|00000a70| 3d 22 69 6d 67 37 2e 70 | 6e 67 22 0a 20 41 4c 54 |="img7.p|ng". ALT|
|00000a80| 3d 22 5c 62 65 67 69 6e | 7b 66 75 6e 63 64 65 73 |="\begin|{funcdes|
|00000a90| 63 7d 7b 61 63 71 75 69 | 72 65 7d 7b 5c 6f 70 74 |c}{acqui|re}{\opt|
|00000aa0| 69 6f 6e 61 6c 7b 77 61 | 69 74 66 6c 61 67 7d 7d |ional{wa|itflag}}|
|00000ab0| 0a 57 69 74 68 6f 75 74 | 20 74 68 65 20 6f 70 74 |.Without| the opt|
|00000ac0| 69 6f 6e 61 6c 20 61 72 | 67 75 6d 65 6e 74 2c 20 |ional ar|gument, |
|00000ad0| 74 68 2e 2e 2e 0a 2e 2e | 2e 72 65 74 75 72 6e 20 |th......|.return |
|00000ae0| 76 61 6c 75 65 20 69 73 | 20 31 20 69 66 20 74 68 |value is| 1 if th|
|00000af0| 65 20 6c 6f 63 6b 20 69 | 73 20 61 63 71 75 69 72 |e lock i|s acquir|
|00000b00| 65 64 20 73 75 63 63 65 | 73 73 66 75 6c 6c 79 2c |ed succe|ssfully,|
|00000b10| 20 30 20 69 66 20 6e 6f | 74 2e 0a 5c 65 6e 64 7b | 0 if no|t..\end{|
|00000b20| 66 75 6e 63 64 65 73 63 | 7d 22 3e 0a 3c 42 52 3e |funcdesc|}">.<BR>|
|00000b30| 0a 0a 3c 50 3e 0a 3c 42 | 52 3e 0a 3c 49 4d 47 0a |..<P>.<B|R>.<IMG.|
|00000b40| 20 20 53 54 59 4c 45 3d | 22 68 65 69 67 68 74 3a | STYLE=|"height:|
|00000b50| 20 32 2e 31 37 65 78 3b | 20 76 65 72 74 69 63 61 | 2.17ex;| vertica|
|00000b60| 6c 2d 61 6c 69 67 6e 3a | 20 31 37 36 2e 35 34 65 |l-align:| 176.54e|
|00000b70| 78 3b 20 22 20 53 52 43 | 3d 22 69 6d 67 38 2e 70 |x; " SRC|="img8.p|
|00000b80| 6e 67 22 0a 20 41 4c 54 | 3d 22 5c 62 65 67 69 6e |ng". ALT|="\begin|
|00000b90| 7b 66 75 6e 63 64 65 73 | 63 7d 7b 72 65 6c 65 61 |{funcdes|c}{relea|
|00000ba0| 73 65 7d 7b 7d 0a 52 65 | 6c 65 61 73 65 73 20 74 |se}{}.Re|leases t|
|00000bb0| 68 65 20 6c 6f 63 6b 2e | 20 54 68 65 20 6c 6f 63 |he lock.| The loc|
|00000bc0| 6b 20 6d 75 73 74 20 68 | 61 76 65 20 62 65 65 6e |k must h|ave been|
|00000bd0| 20 61 63 71 75 69 72 65 | 64 20 65 61 72 6c 69 65 | acquire|d earlie|
|00000be0| 72 2c 20 62 75 74 20 6e | 6f 74 0a 6e 65 63 65 73 |r, but n|ot.neces|
|00000bf0| 73 61 72 69 6c 79 20 62 | 79 20 74 68 65 20 73 61 |sarily b|y the sa|
|00000c00| 6d 65 20 74 68 72 65 61 | 64 2e 0a 5c 65 6e 64 7b |me threa|d..\end{|
|00000c10| 66 75 6e 63 64 65 73 63 | 7d 22 3e 0a 3c 42 52 3e |funcdesc|}">.<BR>|
|00000c20| 0a 0a 3c 50 3e 0a 3c 42 | 52 3e 0a 3c 49 4d 47 0a |..<P>.<B|R>.<IMG.|
|00000c30| 20 20 53 54 59 4c 45 3d | 22 68 65 69 67 68 74 3a | STYLE=|"height:|
|00000c40| 20 32 2e 31 30 65 78 3b | 20 76 65 72 74 69 63 61 | 2.10ex;| vertica|
|00000c50| 6c 2d 61 6c 69 67 6e 3a | 20 31 37 36 2e 36 38 65 |l-align:| 176.68e|
|00000c60| 78 3b 20 22 20 53 52 43 | 3d 22 69 6d 67 39 2e 70 |x; " SRC|="img9.p|
|00000c70| 6e 67 22 0a 20 41 4c 54 | 3d 22 5c 62 65 67 69 6e |ng". ALT|="\begin|
|00000c80| 7b 66 75 6e 63 64 65 73 | 63 7d 7b 6c 6f 63 6b 65 |{funcdes|c}{locke|
|00000c90| 64 7d 7b 7d 0a 52 65 74 | 75 72 6e 20 74 68 65 20 |d}{}.Ret|urn the |
|00000ca0| 73 74 61 74 75 73 20 6f | 66 20 74 68 65 20 6c 6f |status o|f the lo|
|00000cb0| 63 6b 3a 5c 20 31 20 69 | 66 20 69 74 20 68 61 73 |ck:\ 1 i|f it has|
|00000cc0| 20 62 65 65 6e 20 61 63 | 71 75 69 72 65 64 20 62 | been ac|quired b|
|00000cd0| 79 20 73 6f 6d 65 0a 74 | 68 72 65 61 64 2c 20 30 |y some.t|hread, 0|
|00000ce0| 20 69 66 20 6e 6f 74 2e | 0a 5c 65 6e 64 7b 66 75 | if not.|.\end{fu|
|00000cf0| 6e 63 64 65 73 63 7d 22 | 3e 0a 3c 42 52 3e 0a 0a |ncdesc}"|>.<BR>..|
|00000d00| 3c 50 3e 0a 3c 42 3e 43 | 61 76 65 61 74 73 3a 3c |<P>.<B>C|aveats:<|
|00000d10| 2f 42 3e 0a 0a 3c 50 3e | 0a 0a 3c 55 4c 3e 0a 3c |/B>..<P>|..<UL>.<|
|00000d20| 4c 49 3e 54 68 72 65 61 | 64 73 20 69 6e 74 65 72 |LI>Threa|ds inter|
|00000d30| 61 63 74 20 73 74 72 61 | 6e 67 65 6c 79 20 77 69 |act stra|ngely wi|
|00000d40| 74 68 20 69 6e 74 65 72 | 72 75 70 74 73 3a 20 74 |th inter|rupts: t|
|00000d50| 68 65 0a 4b 65 79 62 6f | 61 72 64 49 6e 74 65 72 |he.Keybo|ardInter|
|00000d60| 72 75 70 74 20 65 78 63 | 65 70 74 69 6f 6e 20 77 |rupt exc|eption w|
|00000d70| 69 6c 6c 20 62 65 20 72 | 65 63 65 69 76 65 64 20 |ill be r|eceived |
|00000d80| 62 79 20 61 6e 20 61 72 | 62 69 74 72 61 72 79 0a |by an ar|bitrary.|
|00000d90| 74 68 72 65 61 64 2e 20 | 20 28 57 68 65 6e 20 74 |thread. | (When t|
|00000da0| 68 65 20 73 69 67 6e 61 | 6c 20 6d 6f 64 75 6c 65 |he signa|l module|
|00000db0| 20 69 73 20 61 76 61 69 | 6c 61 62 6c 65 2c 20 69 | is avai|lable, i|
|00000dc0| 6e 74 65 72 72 75 70 74 | 73 0a 61 6c 77 61 79 73 |nterrupt|s.always|
|00000dd0| 20 67 6f 20 74 6f 20 74 | 68 65 20 6d 61 69 6e 20 | go to t|he main |
|00000de0| 74 68 72 65 61 64 2e 29 | 0a 0a 3c 50 3e 0a 3c 2f |thread.)|..<P>.</|
|00000df0| 4c 49 3e 0a 3c 4c 49 3e | 43 61 6c 6c 69 6e 67 20 |LI>.<LI>|Calling |
|00000e00| 73 79 73 2e 65 78 69 74 | 28 29 20 6f 72 20 72 61 |sys.exit|() or ra|
|00000e10| 69 73 69 6e 67 20 74 68 | 65 20 53 79 73 74 65 6d |ising th|e System|
|00000e20| 45 78 69 74 20 69 73 0a | 65 71 75 69 76 61 6c 65 |Exit is.|equivale|
|00000e30| 6e 74 20 74 6f 20 63 61 | 6c 6c 69 6e 67 20 74 68 |nt to ca|lling th|
|00000e40| 72 65 61 64 2e 65 78 69 | 74 5f 74 68 72 65 61 64 |read.exi|t_thread|
|00000e50| 28 29 2e 0a 0a 3c 50 3e | 0a 3c 2f 4c 49 3e 0a 3c |()...<P>|.</LI>.<|
|00000e60| 4c 49 3e 4e 6f 74 20 61 | 6c 6c 20 62 75 69 6c 74 |LI>Not a|ll built|
|00000e70| 2d 69 6e 20 66 75 6e 63 | 74 69 6f 6e 73 20 74 68 |-in func|tions th|
|00000e80| 61 74 20 6d 61 79 20 62 | 6c 6f 63 6b 20 77 61 69 |at may b|lock wai|
|00000e90| 74 69 6e 67 20 66 6f 72 | 20 49 2f 4f 20 61 6c 6c |ting for| I/O all|
|00000ea0| 6f 77 20 6f 74 68 65 72 | 0a 74 68 72 65 61 64 73 |ow other|.threads|
|00000eb0| 20 74 6f 20 72 75 6e 2e | 20 20 28 54 68 65 20 6d | to run.| (The m|
|00000ec0| 6f 73 74 20 70 6f 70 75 | 6c 61 72 20 6f 6e 65 73 |ost popu|lar ones|
|00000ed0| 20 28 73 6c 65 65 70 2c | 20 72 65 61 64 2c 0a 73 | (sleep,| read,.s|
|00000ee0| 65 6c 65 63 74 29 20 77 | 6f 72 6b 20 61 73 20 65 |elect) w|ork as e|
|00000ef0| 78 70 65 63 74 65 64 2e | 29 0a 0a 3c 50 3e 0a 3c |xpected.|)..<P>.<|
|00000f00| 2f 4c 49 3e 0a 3c 2f 55 | 4c 3e 0a 3c 48 52 3e 0a |/LI>.</U|L>.<HR>.|
|00000f10| 0a 3c 2f 42 4f 44 59 3e | 0a 3c 2f 48 54 4d 4c 3e |.</BODY>|.</HTML>|
|00000f20| 0a | |. | |
+--------+-------------------------+-------------------------+--------+--------+