index.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta name="generator" content="rustdoc">
  7. <meta name="description" content="API documentation for the Rust `crossbeam` crate.">
  8. <meta name="keywords" content="rust, rustlang, rust-lang, crossbeam">
  9. <title>crossbeam - Rust</title>
  10. <link rel="stylesheet" type="text/css" href="../normalize.css">
  11. <link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle">
  12. <link rel="stylesheet" type="text/css" href="../dark.css">
  13. <link rel="stylesheet" type="text/css" href="../main.css" id="themeStyle">
  14. <script src="../storage.js"></script>
  15. </head>
  16. <body class="rustdoc mod">
  17. <!--[if lte IE 8]>
  18. <div class="warning">
  19. This old browser is unsupported and will most likely display funky
  20. things.
  21. </div>
  22. <![endif]-->
  23. <nav class="sidebar">
  24. <div class="sidebar-menu">&#9776;</div>
  25. <p class='location'>Crate crossbeam</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'></p><script>window.sidebarCurrent = {name: 'crossbeam', ty: 'mod', relpath: '../'};</script></div>
  26. </nav>
  27. <div class="theme-picker">
  28. <button id="theme-picker" aria-label="Pick another theme!">
  29. <img src="../brush.svg" width="18" alt="Pick another theme!">
  30. </button>
  31. <div id="theme-choices"></div>
  32. </div>
  33. <script src="../theme.js"></script>
  34. <nav class="sub">
  35. <form class="search-form js-only">
  36. <div class="search-container">
  37. <input class="search-input" name="search"
  38. autocomplete="off"
  39. placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
  40. type="search">
  41. </div>
  42. </form>
  43. </nav>
  44. <section id='main' class="content">
  45. <h1 class='fqn'><span class='in-band'>Crate <a class="mod" href=''>crossbeam</a></span><span class='out-of-band'><span id='render-detail'>
  46. <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
  47. [<span class='inner'>&#x2212;</span>]
  48. </a>
  49. </span><a class='srclink' href='../src/crossbeam/lib.rs.html#1-67' title='goto source code'>[src]</a></span></h1>
  50. <div class='docblock'><p>Support for concurrent and parallel programming.</p>
  51. <p>This crate is an early work in progress. The focus for the moment is
  52. concurrency:</p>
  53. <ul>
  54. <li>
  55. <p><strong>Non-blocking data structures</strong>. These data structures allow for high
  56. performance, highly-concurrent access, much superior to wrapping with a
  57. <code>Mutex</code>. Ultimately the goal is to include stacks, queues, deques, bags,
  58. sets and maps. These live in the <code>sync</code> module.</p>
  59. </li>
  60. <li>
  61. <p><strong>Memory management</strong>. Because non-blocking data structures avoid global
  62. synchronization, it is not easy to tell when internal data can be safely
  63. freed. The <code>mem</code> module provides generic, easy to use, and high-performance
  64. APIs for managing memory in these cases. These live in the <code>mem</code> module.</p>
  65. </li>
  66. <li>
  67. <p><strong>Synchronization</strong>. The standard library provides a few synchronization
  68. primitives (locks, barriers, etc) but this crate seeks to expand that set
  69. to include more advanced/niche primitives, as well as userspace
  70. alternatives. These live in the <code>sync</code> module.</p>
  71. </li>
  72. <li>
  73. <p><strong>Scoped thread API</strong>. Finally, the crate provides a &quot;scoped&quot; thread API,
  74. making it possible to spawn threads that share stack data with their
  75. parents. This functionality is exported at the top-level.</p>
  76. </li>
  77. </ul>
  78. </div><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
  79. <table>
  80. <tr class=' module-item'>
  81. <td><a class="mod" href="epoch/index.html"
  82. title='mod crossbeam::epoch'>epoch</a></td>
  83. <td class='docblock-short'>
  84. <p>Epoch-based memory management</p>
  85. </td>
  86. </tr>
  87. <tr class=' module-item'>
  88. <td><a class="mod" href="sync/index.html"
  89. title='mod crossbeam::sync'>sync</a></td>
  90. <td class='docblock-short'>
  91. <p>Synchronization primitives.</p>
  92. </td>
  93. </tr></table><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
  94. <table>
  95. <tr class=' module-item'>
  96. <td><a class="struct" href="struct.CachePadded.html"
  97. title='struct crossbeam::CachePadded'>CachePadded</a></td>
  98. <td class='docblock-short'>
  99. <p>Pad <code>T</code> to the length of a cacheline.</p>
  100. </td>
  101. </tr>
  102. <tr class=' module-item'>
  103. <td><a class="struct" href="struct.Scope.html"
  104. title='struct crossbeam::Scope'>Scope</a></td>
  105. <td class='docblock-short'>
  106. </td>
  107. </tr>
  108. <tr class=' module-item'>
  109. <td><a class="struct" href="struct.ScopedJoinHandle.html"
  110. title='struct crossbeam::ScopedJoinHandle'>ScopedJoinHandle</a></td>
  111. <td class='docblock-short'>
  112. <p>A handle to a scoped thread</p>
  113. </td>
  114. </tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
  115. <table>
  116. <tr class=' module-item'>
  117. <td><a class="trait" href="trait.ZerosValid.html"
  118. title='trait crossbeam::ZerosValid'>ZerosValid</a></td>
  119. <td class='docblock-short'>
  120. <p>Types for which mem::zeroed() is safe.</p>
  121. </td>
  122. </tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
  123. <table>
  124. <tr class=' module-item'>
  125. <td><a class="fn" href="fn.builder_spawn_unsafe.html"
  126. title='fn crossbeam::builder_spawn_unsafe'>builder_spawn_unsafe</a><a title='unsafe function' href='#'><sup>⚠</sup></a></td>
  127. <td class='docblock-short'>
  128. <p>Like <code>std::thread::Builder::spawn</code>, but without the closure bounds.</p>
  129. </td>
  130. </tr>
  131. <tr class=' module-item'>
  132. <td><a class="fn" href="fn.scope.html"
  133. title='fn crossbeam::scope'>scope</a></td>
  134. <td class='docblock-short'>
  135. <p>Create a new <code>scope</code>, for deferred destructors.</p>
  136. </td>
  137. </tr>
  138. <tr class=' module-item'>
  139. <td><a class="fn" href="fn.spawn_unsafe.html"
  140. title='fn crossbeam::spawn_unsafe'>spawn_unsafe</a><a title='unsafe function' href='#'><sup>⚠</sup></a></td>
  141. <td class='docblock-short'>
  142. <p>Like <code>std::thread::spawn</code>, but without the closure bounds.</p>
  143. </td>
  144. </tr></table></section>
  145. <section id='search' class="content hidden"></section>
  146. <section class="footer"></section>
  147. <aside id="help" class="hidden">
  148. <div>
  149. <h1 class="hidden">Help</h1>
  150. <div class="shortcuts">
  151. <h2>Keyboard Shortcuts</h2>
  152. <dl>
  153. <dt><kbd>?</kbd></dt>
  154. <dd>Show this help dialog</dd>
  155. <dt><kbd>S</kbd></dt>
  156. <dd>Focus the search field</dd>
  157. <dt><kbd>↑</kbd></dt>
  158. <dd>Move up in search results</dd>
  159. <dt><kbd>↓</kbd></dt>
  160. <dd>Move down in search results</dd>
  161. <dt><kbd>↹</kbd></dt>
  162. <dd>Switch tab</dd>
  163. <dt><kbd>&#9166;</kbd></dt>
  164. <dd>Go to active search result</dd>
  165. <dt><kbd>+</kbd></dt>
  166. <dd>Expand all sections</dd>
  167. <dt><kbd>-</kbd></dt>
  168. <dd>Collapse all sections</dd>
  169. </dl>
  170. </div>
  171. <div class="infos">
  172. <h2>Search Tricks</h2>
  173. <p>
  174. Prefix searches with a type followed by a colon (e.g.
  175. <code>fn:</code>) to restrict the search to a given type.
  176. </p>
  177. <p>
  178. Accepted types are: <code>fn</code>, <code>mod</code>,
  179. <code>struct</code>, <code>enum</code>,
  180. <code>trait</code>, <code>type</code>, <code>macro</code>,
  181. and <code>const</code>.
  182. </p>
  183. <p>
  184. Search functions by type signature (e.g.
  185. <code>vec -> usize</code> or <code>* -> vec</code>)
  186. </p>
  187. </div>
  188. </div>
  189. </aside>
  190. <script>
  191. window.rootPath = "../";
  192. window.currentCrate = "crossbeam";
  193. </script>
  194. <script src="../main.js"></script>
  195. <script defer src="../search-index.js"></script>
  196. </body>
  197. </html>