index.html 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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 `sync` mod in crate `futures`.">
  8. <meta name="keywords" content="rust, rustlang, rust-lang, sync">
  9. <title>futures::sync - 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'>Module sync</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li></ul></div><p class='location'><a href='../index.html'>futures</a></p><script>window.sidebarCurrent = {name: 'sync', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></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'>Module <a href='../index.html'>futures</a>::<wbr><a class="mod" href=''>sync</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/futures/sync/mod.rs.html#1-17' title='goto source code'>[src]</a></span></h1>
  50. <div class='docblock'><p>Future-aware synchronization</p>
  51. <p>This module, which is modeled after <code>std::sync</code>, contains user-space
  52. synchronization tools that work with futures, streams and sinks. In
  53. particular, these synchronizers do <em>not</em> block physical OS threads, but
  54. instead work at the task level.</p>
  55. <p>More information and examples of how to use these synchronization primitives
  56. can be found <a href="https://tokio.rs/docs/going-deeper-futures/synchronization/">online at tokio.rs</a>.</p>
  57. </div><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
  58. <table>
  59. <tr class=' module-item'>
  60. <td><a class="mod" href="mpsc/index.html"
  61. title='mod futures::sync::mpsc'>mpsc</a></td>
  62. <td class='docblock-short'>
  63. <p>A multi-producer, single-consumer, futures-aware, FIFO queue with back pressure.</p>
  64. </td>
  65. </tr>
  66. <tr class=' module-item'>
  67. <td><a class="mod" href="oneshot/index.html"
  68. title='mod futures::sync::oneshot'>oneshot</a></td>
  69. <td class='docblock-short'>
  70. <p>A one-shot, futures-aware channel</p>
  71. </td>
  72. </tr></table><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
  73. <table>
  74. <tr class=' module-item'>
  75. <td><a class="struct" href="struct.BiLock.html"
  76. title='struct futures::sync::BiLock'>BiLock</a></td>
  77. <td class='docblock-short'>
  78. <p>A type of futures-powered synchronization primitive which is a mutex between
  79. two possible owners.</p>
  80. </td>
  81. </tr>
  82. <tr class=' module-item'>
  83. <td><a class="struct" href="struct.BiLockAcquire.html"
  84. title='struct futures::sync::BiLockAcquire'>BiLockAcquire</a></td>
  85. <td class='docblock-short'>
  86. <p>Future returned by <code>BiLock::lock</code> which will resolve when the lock is
  87. acquired.</p>
  88. </td>
  89. </tr>
  90. <tr class=' module-item'>
  91. <td><a class="struct" href="struct.BiLockAcquired.html"
  92. title='struct futures::sync::BiLockAcquired'>BiLockAcquired</a></td>
  93. <td class='docblock-short'>
  94. <p>Resolved value of the <code>BiLockAcquire&lt;T&gt;</code> future.</p>
  95. </td>
  96. </tr>
  97. <tr class=' module-item'>
  98. <td><a class="struct" href="struct.BiLockGuard.html"
  99. title='struct futures::sync::BiLockGuard'>BiLockGuard</a></td>
  100. <td class='docblock-short'>
  101. <p>Returned RAII guard from the <code>poll_lock</code> method.</p>
  102. </td>
  103. </tr></table></section>
  104. <section id='search' class="content hidden"></section>
  105. <section class="footer"></section>
  106. <aside id="help" class="hidden">
  107. <div>
  108. <h1 class="hidden">Help</h1>
  109. <div class="shortcuts">
  110. <h2>Keyboard Shortcuts</h2>
  111. <dl>
  112. <dt><kbd>?</kbd></dt>
  113. <dd>Show this help dialog</dd>
  114. <dt><kbd>S</kbd></dt>
  115. <dd>Focus the search field</dd>
  116. <dt><kbd>↑</kbd></dt>
  117. <dd>Move up in search results</dd>
  118. <dt><kbd>↓</kbd></dt>
  119. <dd>Move down in search results</dd>
  120. <dt><kbd>↹</kbd></dt>
  121. <dd>Switch tab</dd>
  122. <dt><kbd>&#9166;</kbd></dt>
  123. <dd>Go to active search result</dd>
  124. <dt><kbd>+</kbd></dt>
  125. <dd>Expand all sections</dd>
  126. <dt><kbd>-</kbd></dt>
  127. <dd>Collapse all sections</dd>
  128. </dl>
  129. </div>
  130. <div class="infos">
  131. <h2>Search Tricks</h2>
  132. <p>
  133. Prefix searches with a type followed by a colon (e.g.
  134. <code>fn:</code>) to restrict the search to a given type.
  135. </p>
  136. <p>
  137. Accepted types are: <code>fn</code>, <code>mod</code>,
  138. <code>struct</code>, <code>enum</code>,
  139. <code>trait</code>, <code>type</code>, <code>macro</code>,
  140. and <code>const</code>.
  141. </p>
  142. <p>
  143. Search functions by type signature (e.g.
  144. <code>vec -> usize</code> or <code>* -> vec</code>)
  145. </p>
  146. </div>
  147. </div>
  148. </aside>
  149. <script>
  150. window.rootPath = "../../";
  151. window.currentCrate = "futures";
  152. </script>
  153. <script src="../../main.js"></script>
  154. <script defer src="../../search-index.js"></script>
  155. </body>
  156. </html>